HBASE-3301 Treat java.net.SocketTimeoutException same as ConnectException assigning/unassigning regions

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1041533 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-12-02 19:02:28 +00:00
parent 2122dafaa4
commit abd53c354d
3 changed files with 10 additions and 3 deletions

View File

@ -736,6 +736,8 @@ Release 0.90.0 - Unreleased
HBASE-3291 If split happens while regionserver is going down, we can stick open.
HBASE-3295 Dropping a 1k+ regions table likely ends in a client socket timeout
and it's very confusing
HBASE-3301 Treat java.net.SocketTimeoutException same as ConnectException
assigning/unassigning regions
IMPROVEMENTS

View File

@ -286,6 +286,9 @@ public class MetaReader {
r = metaServer.get(catalogRegionName,
new Get(regionName).addColumn(HConstants.CATALOG_FAMILY,
HConstants.SERVER_QUALIFIER));
} catch (java.net.SocketTimeoutException e) {
// Treat this exception + message as unavailable catalog table. Catch it
// and fall through to return a null
} catch (java.net.ConnectException e) {
if (e.getMessage() != null &&
e.getMessage().contains("Connection refused")) {

View File

@ -1031,11 +1031,13 @@ public class AssignmentManager extends ZooKeeperListener {
LOG.debug("Server " + server + " region CLOSE RPC returned false");
} catch (NotServingRegionException nsre) {
// Failed to close, so pass through and reassign
LOG.info("Server " + server + " returned NotServingRegionException");
LOG.info("Server " + server + " returned " + nsre);
} catch (ConnectException e) {
// Failed to connect, so pass through and reassign
LOG.info("Server " + server + " returned ConnectException " +
e.getMessage());
LOG.info("Server " + server + " returned " + e.getMessage());
} catch (java.net.SocketTimeoutException e) {
// Failed to connect, so pass through and reassign
LOG.info("Server " + server + " returned " + e.getMessage());
} catch (RemoteException re) {
if (re.unwrapRemoteException() instanceof NotServingRegionException) {
// Failed to close, so pass through and reassign