NihalJain commented on code in PR #8758:
URL: https://github.com/apache/hbase/pull/8758#discussion_r4250562189
##########
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();
+ }
+ int rpcThrottleEnabled = 0;
+ if (QuotaUtil.isQuotaEnabled(master.getConfiguration())) {
Review Comment:
In maintenance mode finishActiveMasterInitialization returns before
initQuotaManager(), so with quota enabled rpcThrottleEnabled stays -1 for the
lifetime of the Master. The docs say “until the quota manager is ready”, which
implies it’s transient. Could you document this case of maintenance, or report
0 like the other switches already do in maintenance mode?
Worth testing out the metrics in MAINTENANCE_MODE =
"hbase.master.maintenance_mode"
--
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]