瀏覽代碼

Revert "HDFS-15111. stopStandbyServices() should log which service state it is transitioning from. Contributed by Xieming Li."

This reverts commit cb6b6b43200f0c339c7f0878dfa2b9c54bac64e7.
Wei-Chiu Chuang 5 年之前
父節點
當前提交
024c33384b

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

@@ -95,7 +95,6 @@ import java.util.concurrent.atomic.AtomicLong;
 
 import static org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.*;
 import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.ACTIVE;
-import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.STANDBY;
 import static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState.OBSERVER;
 import org.apache.hadoop.hdfs.protocol.OpenFileEntry;
 import org.apache.hadoop.hdfs.server.protocol.SlowDiskReports;
@@ -1392,8 +1391,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
 
   /** Stop services required in standby state */
   void stopStandbyServices() throws IOException {
-    HAServiceState curState = getState() == OBSERVER? OBSERVER : STANDBY;
-    LOG.info("Stopping services started for {} state", curState);
+    LOG.info("Stopping services started for standby state");
     if (standbyCheckpointer != null) {
       standbyCheckpointer.stop();
     }