HDFS-14391. Backport HDFS-9659 to branch-2. Contributed by Chao Sun.

This commit is contained in:
Chen Liang 2019-03-28 10:39:45 -07:00
parent 7935485eec
commit 99e41293ee
1 changed files with 5 additions and 1 deletions

View File

@ -499,8 +499,12 @@ public class EditLogTailer {
currentNN = nnLookup.next();
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,
RPC.getProtocolVersion(NamenodeProtocolPB.class), currentNN.getIpcAddress(), conf);
RPC.getProtocolVersion(NamenodeProtocolPB.class), currentNN.getIpcAddress(), conf,
rpcTimeout, Long.MAX_VALUE);
cachedActiveProxy = new NamenodeProtocolTranslatorPB(proxy);
break;
} catch (IOException e) {