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

Signed-off-by: Liangjun He <heliangjun@apache.org>
This commit is contained in:
Duo Zhang 2023-05-04 20:59:40 +08:00 committed by GitHub
parent 89e80da57f
commit 78610decaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -67,13 +67,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