HBASE-21260 The whole balancer plans might be aborted if there are more than one plans to move a same region

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
haxiaolin 2018-10-09 15:48:02 +08:00 committed by Duo Zhang
parent 3d0b253248
commit 31dec21538
1 changed files with 8 additions and 1 deletions

View File

@ -1630,7 +1630,14 @@ public class HMaster extends HRegionServer implements MasterServices {
for (RegionPlan plan: plans) { for (RegionPlan plan: plans) {
LOG.info("balance " + plan); LOG.info("balance " + plan);
//TODO: bulk assign //TODO: bulk assign
try {
this.assignmentManager.moveAsync(plan); this.assignmentManager.moveAsync(plan);
} catch (HBaseIOException hioe) {
//should ignore failed plans here, avoiding the whole balance plans be aborted
//later calls of balance() can fetch up the failed and skipped plans
LOG.warn("Failed balance plan: {}, just skip it", plan, hioe);
}
//rpCount records balance plans processed, does not care if a plan succeeds
rpCount++; rpCount++;
balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition, balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition,