From 93b8f453b96470f1a6cc9ac098f4934ddd631657 Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Mon, 24 Feb 2020 20:17:01 +0530 Subject: [PATCH] HDFS-15166. Remove redundant field fStream in ByteStringLog. Contributed by Xieming Li. --- .../hadoop/hdfs/server/namenode/EditLogFileInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java index b81cd1cf97..26c5e9049f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java @@ -67,7 +67,6 @@ static private enum State { CLOSED } private State state = State.UNINIT; - private InputStream fStream = null; private int logVersion = 0; private FSEditLogOp.Reader reader = null; private FSEditLogLoader.PositionTrackingInputStream tracker = null; @@ -153,6 +152,7 @@ private void init(boolean verifyLayoutVersion) throws LogHeaderCorruptException, IOException { Preconditions.checkState(state == State.UNINIT); BufferedInputStream bin = null; + InputStream fStream = null; try { fStream = log.getInputStream(); bin = new BufferedInputStream(fStream);