Skip to content

Commit

Permalink
HBASE-22440. Override getWalGroupsReplicationStatus to avoid NPE
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <[email protected]>
  • Loading branch information
puleya77 authored and Apache9 committed May 23, 2019
1 parent f1a8aa4 commit f773043
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
import org.apache.hadoop.hbase.replication.master.ReplicationHFileCleaner;
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner;
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.SecurityConstants;
import org.apache.hadoop.hbase.security.UserProvider;
Expand Down Expand Up @@ -3991,4 +3992,12 @@ public SnapshotQuotaObserverChore getSnapshotQuotaObserverChore() {
public SyncReplicationReplayWALManager getSyncReplicationReplayWALManager() {
return this.syncReplicationReplayWALManager;
}

@Override
public Map<String, ReplicationStatus> getWalGroupsReplicationStatus() {
if (!this.isOnline() || !LoadBalancer.isMasterCanHostUserRegions(conf)) {
return new HashMap<>();
}
return super.getWalGroupsReplicationStatus();
}
}

0 comments on commit f773043

Please sign in to comment.