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:
parent
1e3fe3ceac
commit
f6bb4bb93e
|
@ -55,11 +55,17 @@ public class MetricsMasterWrapperImpl implements MetricsMasterWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getSplitPlanCount() {
|
public long getSplitPlanCount() {
|
||||||
|
if (master.getRegionNormalizerManager() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return master.getRegionNormalizerManager().getSplitPlanCount();
|
return master.getRegionNormalizerManager().getSplitPlanCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMergePlanCount() {
|
public long getMergePlanCount() {
|
||||||
|
if (master.getRegionNormalizerManager() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return master.getRegionNormalizerManager().getMergePlanCount();
|
return master.getRegionNormalizerManager().getMergePlanCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue