HBASE-25693 NPE getting metrics from standby masters (MetricsMasterWrapperImpl.getMergePlanCount) (#3091)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
This commit is contained in:
Andrew Purtell 2021-03-24 19:09:10 -07:00
parent 91205bf227
commit a11220d3bf
1 changed files with 6 additions and 0 deletions

View File

@ -50,11 +50,17 @@ public class MetricsMasterWrapperImpl implements MetricsMasterWrapper {
@Override
public long getSplitPlanCount() {
if (master.getRegionNormalizerManager() == null) {
return 0;
}
return master.getRegionNormalizerManager().getSplitPlanCount();
}
@Override
public long getMergePlanCount() {
if (master.getRegionNormalizerManager() == null) {
return 0;
}
return master.getRegionNormalizerManager().getMergePlanCount();
}