HDFS-9659. EditLogTailerThread to Active Namenode RPC should timeout (Contributed by surendra singh lilhore)

This commit is contained in:
Vinayakumar B 2016-02-01 14:10:55 +05:30
parent e418bd1fb0
commit 8f2622b6a0
2 changed files with 8 additions and 1 deletions

View File

@ -903,6 +903,9 @@ Trunk (Unreleased)
HDFS-9575. Use byte array for internal block indices in a striped block. HDFS-9575. Use byte array for internal block indices in a striped block.
(jing9 via szetszwo) (jing9 via szetszwo)
HDFS-9659. EditLogTailerThread to Active Namenode RPC should timeout
(surendra singh lilhore via vinayakumarb)
Release 2.9.0 - UNRELEASED Release 2.9.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -450,8 +450,12 @@ public class EditLogTailer {
currentNN = nnLookup.next(); currentNN = nnLookup.next();
try { try {
int rpcTimeout = conf.getInt(
DFSConfigKeys.DFS_HA_LOGROLL_RPC_TIMEOUT_KEY,
DFSConfigKeys.DFS_HA_LOGROLL_RPC_TIMEOUT_DEFAULT);
NamenodeProtocolPB proxy = RPC.waitForProxy(NamenodeProtocolPB.class, NamenodeProtocolPB proxy = RPC.waitForProxy(NamenodeProtocolPB.class,
RPC.getProtocolVersion(NamenodeProtocolPB.class), currentNN.getIpcAddress(), conf); RPC.getProtocolVersion(NamenodeProtocolPB.class), currentNN.getIpcAddress(), conf,
rpcTimeout, Long.MAX_VALUE);
cachedActiveProxy = new NamenodeProtocolTranslatorPB(proxy); cachedActiveProxy = new NamenodeProtocolTranslatorPB(proxy);
break; break;
} catch (IOException e) { } catch (IOException e) {