HBASE-26885 The TRSP should not go on when it get a bogus server name… (#4276)

* HBASE-26885 The TRSP should not go on when it get a bogus server name from AM
This commit is contained in:
bsglz 2022-03-29 10:05:24 +08:00 committed by GitHub
parent 19da537a7b
commit 1efd8fe53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,8 @@
*/
package org.apache.hadoop.hbase.master.assignment;
import static org.apache.hadoop.hbase.master.LoadBalancer.BOGUS_SERVER_NAME;
import edu.umd.cs.findbugs.annotations.Nullable;
import java.io.IOException;
import org.apache.hadoop.hbase.HBaseIOException;
@ -199,7 +201,7 @@ public class TransitRegionStateProcedure
private void openRegion(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException {
ServerName loc = regionNode.getRegionLocation();
if (loc == null) {
if (loc == null || BOGUS_SERVER_NAME.equals(loc)) {
LOG.warn("No location specified for {}, jump back to state {} to get one", getRegion(),
RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE);
setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE);