HBASE-22440. Override getWalGroupsReplicationStatus to avoid NPE
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
96175c7f51
commit
4b7e256cc6
|
@ -183,6 +183,7 @@ import org.apache.hadoop.hbase.replication.ReplicationUtils;
|
||||||
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.UserProvider;
|
import org.apache.hadoop.hbase.security.UserProvider;
|
||||||
import org.apache.hadoop.hbase.trace.TraceUtil;
|
import org.apache.hadoop.hbase.trace.TraceUtil;
|
||||||
|
@ -3851,4 +3852,12 @@ public class HMaster extends HRegionServer implements MasterServices {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, ReplicationStatus> getWalGroupsReplicationStatus() {
|
||||||
|
if (!this.isOnline() || !LoadBalancer.isMasterCanHostUserRegions(conf)) {
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
|
return super.getWalGroupsReplicationStatus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue