/*
 * Licensed to the University of California, Berkeley under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for additional information regarding
 * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the License. You may obtain a
 * copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package tachyon.master.next.journal;

import tachyon.TachyonURI;
import tachyon.conf.TachyonConf;

import javax.naming.OperationNotSupportedException;
import java.io.IOException;

/**
 * This encapsulates the journal for a master. The journal is made up of 2 components:
 * - The checkpoint: the full state of the master
 * - The entries: incremental entries to apply to the checkpoint.
 *
 * To construct the full state of the master, all the entries must be applied to the checkpoint in
 * order. The entry file most recently being written to is in the base journal folder, where the
 * completed entry files are in the "completed/" sub-directory.
 */
public class ReadOnlyJournal extends Journal {

  public ReadOnlyJournal(String directory, TachyonConf tachyonConf) {
    super(directory, tachyonConf);
  }

  @Override
  public JournalWriter getNewWriter() {
    throw new IllegalStateException("Cannot get a writer for a read-only journal.");
  }

}

@@ -843,132 +843,24 @@
 yon.
-TachyonURI;%0Aimport tachyon.conf.TachyonConf;%0A%0Aimport javax.naming.OperationNotSupportedException;%0Aimport java.io.IOException
+conf.TachyonConf
 ;%0A%0A/

Remove unused imports and fix check style.