HBASE-10182 Potential null object deference in AssignmentManager#handleRegion()

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1551762 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2013-12-17 23:41:31 +00:00
parent e43b527702
commit 5341bb6f1a
1 changed files with 6 additions and 4 deletions

View File

@ -924,10 +924,12 @@ public class AssignmentManager extends ZooKeeperListener {
+ " from " + sn + " but the region isn't PENDING_OPEN/OPENING here: " + " from " + sn + " but the region isn't PENDING_OPEN/OPENING here: "
+ regionStates.getRegionState(encodedName)); + regionStates.getRegionState(encodedName));
// Close it without updating the internal region states, if (regionState != null) {
// so as not to create double assignments in unlucky scenarios // Close it without updating the internal region states,
// mentioned in OpenRegionHandler#process // so as not to create double assignments in unlucky scenarios
unassign(regionState.getRegion(), null, -1, null, false, sn); // mentioned in OpenRegionHandler#process
unassign(regionState.getRegion(), null, -1, null, false, sn);
}
return; return;
} }
// Handle OPENED by removing from transition and deleted zk node // Handle OPENED by removing from transition and deleted zk node