Skip to content

Commit

Permalink
HBASE-26885 The TRSP should not go on when it get a bogus server name… (
Browse files Browse the repository at this point in the history
#4276)

* HBASE-26885 The TRSP should not go on when it get a bogus server name from AM

(cherry picked from commit 1efd8fe)
  • Loading branch information
bsglz committed Mar 29, 2022
1 parent 5308eb3 commit af5624b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -199,7 +201,7 @@ private void queueAssign(MasterProcedureEnv env, RegionStateNode regionNode)

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);
Expand Down

0 comments on commit af5624b

Please sign in to comment.