From 31dec215381090dd13ed8e0bd228b3aaefe0fe47 Mon Sep 17 00:00:00 2001 From: haxiaolin Date: Tue, 9 Oct 2018 15:48:02 +0800 Subject: [PATCH] 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 --- .../java/org/apache/hadoop/hbase/master/HMaster.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 3a487df1ef0..74ce20e69ff 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -1630,7 +1630,14 @@ public class HMaster extends HRegionServer implements MasterServices { for (RegionPlan plan: plans) { LOG.info("balance " + plan); //TODO: bulk assign - this.assignmentManager.moveAsync(plan); + try { + 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++; balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition,