HBASE-27824 NPE in MetricsMasterWrapperImpl.isRunning (#5218)

Signed-off-by: Liangjun He <heliangjun@apache.org>
(cherry picked from commit 78610decaa)
This commit is contained in:
Duo Zhang 2023-05-04 20:59:40 +08:00
parent 9a609bbc3a
commit 760b3fbc3d
1 changed files with 1 additions and 5 deletions

View File

@ -64,13 +64,9 @@ public class MockNoopMasterServices implements MasterServices {
private final Configuration conf;
private final MetricsMaster metricsMaster;
public MockNoopMasterServices() {
this(null);
}
public MockNoopMasterServices(final Configuration conf) {
this.conf = conf;
this.metricsMaster = new MetricsMaster(new MetricsMasterWrapperImpl(null));
this.metricsMaster = new MetricsMaster(new MetricsMasterWrapperImpl(mock(HMaster.class)));
}
@Override