NihalJain commented on code in PR #8758:
URL: https://github.com/apache/hbase/pull/8758#discussion_r4250408057


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapperImpl.java:
##########
@@ -267,4 +269,31 @@ public long getOldWALsDirSize() {
     }
     return master.getMasterWalManager().getOldWALsDirSize();
   }
+
+  @Override
+  public Map<String, Integer> getSwitchStates() {
+    if (!master.isActiveMaster() || !master.isInitialized()) {
+      return Collections.emptyMap();

Review Comment:
   Agree on omitting these on backup masters, but for an 
active-but-not-yet-initialized master, would it be better to emit -1 for all 
keys? That matches the documented “unknown” semantics and keeps the series 
continuous across failover?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to