HBASE-6029 HBCK doesn't recover Balance switch if exception occurs in onlineHbck() (Maryann)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1339689 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-05-17 16:27:46 +00:00
parent aa5ce08ff1
commit cdbaa02276
1 changed files with 6 additions and 4 deletions

View File

@ -383,10 +383,12 @@ public class HBaseFsck {
// turn the balancer off // turn the balancer off
boolean oldBalancer = admin.balanceSwitch(false); boolean oldBalancer = admin.balanceSwitch(false);
try {
onlineConsistencyRepair(); onlineConsistencyRepair();
}
admin.balanceSwitch(oldBalancer); finally {
admin.balanceSwitch(oldBalancer);
}
// Print table summary // Print table summary
printTableSummary(tablesInfo); printTableSummary(tablesInfo);