This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new b182dd8 HDFS-15111. stopStandbyServices() should log which service
state it is transitioning from. Contributed by Xieming Li.
b182dd8 is described below
commit b182dd809cf42aed66806901631ad6062ca0820c
Author: Ayush Saxena <[email protected]>
AuthorDate: Thu Feb 27 04:02:26 2020 +0530
HDFS-15111. stopStandbyServices() should log which service state it is
transitioning from. Contributed by Xieming Li.
---
.../java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 3be3a29..f6b6c46 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -94,6 +94,7 @@ import org.apache.hadoop.hdfs.protocol.HdfsConstants;
import static
org.apache.hadoop.hdfs.DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY;
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.ErasureCodingPolicyInfo;
@@ -1439,7 +1440,8 @@ public class FSNamesystem implements Namesystem,
FSNamesystemMBean,
/** Stop services required in standby state */
void stopStandbyServices() throws IOException {
- LOG.info("Stopping services started for standby state");
+ HAServiceState curState = getState() == OBSERVER? OBSERVER : STANDBY;
+ LOG.info("Stopping services started for {} state", curState);
if (standbyCheckpointer != null) {
standbyCheckpointer.stop();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]