/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the "License"). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio.master.journal.noop;

import alluxio.master.journal.Journal;
import alluxio.proto.journal.Journal.JournalEntry;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

/**
 * Implementation of {@link Journal} that does nothing.
 */
public class NoopJournal implements Journal {

  /**
   * Creates a new instance of {@link NoopJournal}.
   */
  public NoopJournal() {}

  @Override
  public URI getLocation() {
    try {
      return new URI("/noop");
    } catch (URISyntaxException e) {
      throw new RuntimeException(e);
    }
  }

  @Override
  public void write(JournalEntry entry) throws IOException {}

  @Override
  public void flush() throws IOException {}

  @Override
  public void close() throws IOException {}
}

@@ -603,13 +603,14 @@
 xio.
-proto
+master
 .jou
@@ -625,21 +625,65 @@
 rnal
-.JournalEntry
+Context;%0Aimport alluxio.master.journal.NoopJournalContext
 ;%0A%0Ai
@@ -1161,116 +1161,87 @@
 lic 
-void write(JournalEntry entry) throws IOException %7B%7D%0A%0A  @Override%0A  public void flush() throws IOException %7B
+JournalContext createJournalContext() %7B%0A    return new NoopJournalContext();%0A  
 %7D%0A%0A 

Update noop journal to use JournalContext