HBASE-3064 Long sleeping in HConnectionManager after thread is interrupted

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1003709 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-10-01 23:43:46 +00:00
parent 3161a555e1
commit d62b494cb5
2 changed files with 10 additions and 5 deletions

View File

@ -562,6 +562,8 @@ Release 0.21.0 - Unreleased
HBASE-3068 IllegalStateException when new server comes online, is given
200 regions to open and 200th region gets timed out of regions
in transition
HBASE-3064 Long sleeping in HConnectionManager after thread is interrupted
(Bruno Dumon via Stack)
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -335,7 +335,8 @@ public class HConnectionManager {
try {
this.masterLock.wait(getPauseTime(tries));
} catch (InterruptedException e) {
// continue
Thread.currentThread().interrupt();
throw new RuntimeException("Thread was interrupted while trying to connect to master.");
}
}
this.masterChecked = true;
@ -728,8 +729,9 @@ public class HConnectionManager {
}
try{
Thread.sleep(getPauseTime(tries));
} catch (InterruptedException e){
// continue
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IOException("Giving up trying to location region in meta: thread is interrupted.");
}
}
}
@ -916,7 +918,7 @@ public class HConnectionManager {
*
* If ZK has not been initialized yet, this will connect to ZK.
* @returns zookeeper reference
* @throws ZooKeeperConncetionException if there's a problem connecting to zk
* @throws ZooKeeperConnectionException if there's a problem connecting to zk
*/
public synchronized ZooKeeperWatcher getZooKeeperWatcher()
throws ZooKeeperConnectionException {
@ -948,7 +950,8 @@ public class HConnectionManager {
try {
Thread.sleep(getPauseTime(tries));
} catch (InterruptedException e) {
// continue
Thread.currentThread().interrupt();
throw new IOException("Giving up trying to get region server: thread is interrupted.");
}
}
return null;