junegunn commented on code in PR #8758:
URL: https://github.com/apache/hbase/pull/8758#discussion_r4253580060
##########
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:
Thanks for review. You're right that it's more consistent, but I think
emitting `-1` during master restart, which can be quite frequent in some cases,
could make monitoring more complicated without giving much benefit.
So on second thought, how about removing `-1` state altogether and also
omitting `rpcThrottleEnabled` if it's not ready?
--
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]