Bladeren bron

HDFS-15166. Remove redundant field fStream in ByteStringLog. Contributed by Xieming Li.

Ayush Saxena 5 jaren geleden
bovenliggende
commit
a5c3620bc2

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java

@@ -68,7 +68,6 @@ public class EditLogFileInputStream extends EditLogInputStream {
     CLOSED
   }
   private State state = State.UNINIT;
-  private InputStream fStream = null;
   private int logVersion = 0;
   private FSEditLogOp.Reader reader = null;
   private FSEditLogLoader.PositionTrackingInputStream tracker = null;
@@ -154,6 +153,7 @@ public class EditLogFileInputStream extends EditLogInputStream {
       throws LogHeaderCorruptException, IOException {
     Preconditions.checkState(state == State.UNINIT);
     BufferedInputStream bin = null;
+    InputStream fStream = null;
     try {
       fStream = log.getInputStream();
       bin = new BufferedInputStream(fStream);