HBASE-22440. Override getWalGroupsReplicationStatus to avoid NPE
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
f1a8aa4fd7
commit
f773043f87
|
@ -192,6 +192,7 @@ import org.apache.hadoop.hbase.replication.SyncReplicationState;
|
||||||
import org.apache.hadoop.hbase.replication.master.ReplicationHFileCleaner;
|
import org.apache.hadoop.hbase.replication.master.ReplicationHFileCleaner;
|
||||||
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner;
|
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner;
|
||||||
import org.apache.hadoop.hbase.replication.master.ReplicationPeerConfigUpgrader;
|
import org.apache.hadoop.hbase.replication.master.ReplicationPeerConfigUpgrader;
|
||||||
|
import org.apache.hadoop.hbase.replication.regionserver.ReplicationStatus;
|
||||||
import org.apache.hadoop.hbase.security.AccessDeniedException;
|
import org.apache.hadoop.hbase.security.AccessDeniedException;
|
||||||
import org.apache.hadoop.hbase.security.SecurityConstants;
|
import org.apache.hadoop.hbase.security.SecurityConstants;
|
||||||
import org.apache.hadoop.hbase.security.UserProvider;
|
import org.apache.hadoop.hbase.security.UserProvider;
|
||||||
|
@ -3991,4 +3992,12 @@ public class HMaster extends HRegionServer implements MasterServices {
|
||||||
public SyncReplicationReplayWALManager getSyncReplicationReplayWALManager() {
|
public SyncReplicationReplayWALManager getSyncReplicationReplayWALManager() {
|
||||||
return this.syncReplicationReplayWALManager;
|
return this.syncReplicationReplayWALManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, ReplicationStatus> getWalGroupsReplicationStatus() {
|
||||||
|
if (!this.isOnline() || !LoadBalancer.isMasterCanHostUserRegions(conf)) {
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
|
return super.getWalGroupsReplicationStatus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue