HBASE-5781 Zookeeper session got closed while trying to assign the region to RS using hbck -fix

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1326280 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2012-04-15 08:59:11 +00:00
parent a2c1c0cd3e
commit 44a05d4380
1 changed files with 17 additions and 27 deletions

View File

@ -118,9 +118,6 @@ public class HBaseFsckRepair {
*/ */
public static void waitUntilAssigned(HBaseAdmin admin, public static void waitUntilAssigned(HBaseAdmin admin,
HRegionInfo region) throws IOException, InterruptedException { HRegionInfo region) throws IOException, InterruptedException {
HConnection connection = admin.getConnection();
try {
long timeout = admin.getConfiguration().getLong("hbase.hbck.assign.timeout", 120000); long timeout = admin.getConfiguration().getLong("hbase.hbck.assign.timeout", 120000);
long expiration = timeout + System.currentTimeMillis(); long expiration = timeout + System.currentTimeMillis();
while (System.currentTimeMillis() < expiration) { while (System.currentTimeMillis() < expiration) {
@ -143,13 +140,6 @@ public class HBaseFsckRepair {
} }
throw new IOException("Region " + region + " failed to move out of " + throw new IOException("Region " + region + " failed to move out of " +
"transition within timeout " + timeout + "ms"); "transition within timeout " + timeout + "ms");
} finally {
try {
connection.close();
} catch (IOException ioe) {
throw ioe;
}
}
} }
/** /**