HBASE-17265 Region left unassigned in master failover when region failed to open (Allan Yang)
This commit is contained in:
parent
807fcfd22f
commit
52c51fc271
@ -1091,7 +1091,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
|||||||
failedOpenTracker.remove(encodedName);
|
failedOpenTracker.remove(encodedName);
|
||||||
} else {
|
} else {
|
||||||
// Handle this the same as if it were opened and then closed.
|
// Handle this the same as if it were opened and then closed.
|
||||||
regionState = regionStates.updateRegionState(rt, State.CLOSED);
|
regionState = regionStates.setRegionStateTOCLOSED(rt.getRegionName(), sn);
|
||||||
if (regionState != null) {
|
if (regionState != null) {
|
||||||
// When there are more than one region server a new RS is selected as the
|
// When there are more than one region server a new RS is selected as the
|
||||||
// destination and the same is updated in the regionplan. (HBASE-5546)
|
// destination and the same is updated in the regionplan. (HBASE-5546)
|
||||||
|
@ -419,6 +419,16 @@ public class RegionStates {
|
|||||||
return oldState;
|
return oldState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the region state to CLOSED
|
||||||
|
*/
|
||||||
|
public RegionState setRegionStateTOCLOSED(
|
||||||
|
final byte[] regionName,
|
||||||
|
final ServerName serverName) {
|
||||||
|
HRegionInfo regionInfo = getRegionInfo(regionName);
|
||||||
|
return setRegionStateTOCLOSED(regionInfo, serverName);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the region state to CLOSED
|
* Set the region state to CLOSED
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user