Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
0.95.2
-
None
-
None
Description
ipc.HBaseClient is a copy paste from ipc.Client. This implementation now support adress change.
As a side node, HBase comment on 'the max number of retries is 45' is now wrong.
— HBaseClient
} catch (SocketTimeoutException toe)
catch (IOException ie)
{ handleConnectionFailure(ioFailures++, maxRetries, ie); }— Hadoop Client
} catch (SocketTimeoutException toe) {
/* Check for an address change and update the local reference.
- Reset the failure counter if the address was changed
*/
if (updateAddress()) { timeoutFailures = ioFailures = 0; }
/* The max number of retries is 45,
* which amounts to 20s*45 = 15 minutes retries.
*/
handleConnectionFailure(timeoutFailures++, 45, toe);
} catch (IOException ie) {
if (updateAddress()) { timeoutFailures = ioFailures = 0; }handleConnectionFailure(ioFailures++, maxRetries, ie);
}
private synchronized boolean updateAddress() throws IOException {
// Do a fresh lookup with the old host name.
InetSocketAddress currentAddr = NetUtils.makeSocketAddr(
server.getHostName(), server.getPort());
if (!server.equals(currentAddr))
{ LOG.warn("Address change detected. Old: " + server.toString() + " New: " + currentAddr.toString()); server = currentAddr; return true; } return false;
}
Attachments
Issue Links
- is required by
-
HBASE-5843 Improve HBase MTTR - Mean Time To Recover
- Closed