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:
parent
9a609bbc3a
commit
760b3fbc3d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue