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 committed by GitHub
parent 1e3fe3ceac
commit f6bb4bb93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -55,11 +55,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();
}