diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/FederationNamenodeServiceState.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/FederationNamenodeServiceState.java index ed8f8c0456..71bec63445 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/FederationNamenodeServiceState.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/FederationNamenodeServiceState.java @@ -25,6 +25,7 @@ */ public enum FederationNamenodeServiceState { ACTIVE, // HAServiceState.ACTIVE or operational. + OBSERVER, // HAServiceState.OBSERVER. STANDBY, // HAServiceState.STANDBY. UNAVAILABLE, // When the namenode cannot be reached. EXPIRED, // When the last update is too old. @@ -34,10 +35,9 @@ public static FederationNamenodeServiceState getState(HAServiceState state) { switch(state) { case ACTIVE: return FederationNamenodeServiceState.ACTIVE; - case STANDBY: - // TODO: we should probably have a separate state OBSERVER for RBF and - // treat it differently. case OBSERVER: + return FederationNamenodeServiceState.OBSERVER; + case STANDBY: return FederationNamenodeServiceState.STANDBY; case INITIALIZING: return FederationNamenodeServiceState.UNAVAILABLE; diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/federationhealth.html b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/federationhealth.html index cbe983f034..9db42b2878 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/federationhealth.html +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/federationhealth.html @@ -129,6 +129,7 @@