HDFS-4858. HDFS DataNode to NameNode RPC should timeout. Contributed by Henry Wang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1567537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Konstantin Shvachko 2014-02-12 07:06:44 +00:00
parent d09c5d4369
commit 924be82437
3 changed files with 7 additions and 3 deletions

View File

@ -220,7 +220,7 @@ public class Client {
* @param conf Configuration
* @return the ping interval
*/
final static int getPingInterval(Configuration conf) {
final public static int getPingInterval(Configuration conf) {
return conf.getInt(CommonConfigurationKeys.IPC_PING_INTERVAL_KEY,
CommonConfigurationKeys.IPC_PING_INTERVAL_DEFAULT);
}

View File

@ -75,6 +75,9 @@ Release 2.4.0 - UNRELEASED
HDFS-5886. Potential null pointer deference in RpcProgramNfs3#readlink()
(brandonli)
HDFS-4858. HDFS DataNode to NameNode RPC should timeout.
(Henry Wang via shv)
Release 2.3.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -102,9 +102,10 @@ public class DatanodeProtocolClientSideTranslatorPB implements
private static DatanodeProtocolPB createNamenode(
InetSocketAddress nameNodeAddr, Configuration conf,
UserGroupInformation ugi) throws IOException {
return RPC.getProxy(DatanodeProtocolPB.class,
return RPC.getProtocolProxy(DatanodeProtocolPB.class,
RPC.getProtocolVersion(DatanodeProtocolPB.class), nameNodeAddr, ugi,
conf, NetUtils.getSocketFactory(conf, DatanodeProtocolPB.class));
conf, NetUtils.getSocketFactory(conf, DatanodeProtocolPB.class),
org.apache.hadoop.ipc.Client.getPingInterval(conf), null).getProxy();
}
/** Create a {@link NameNode} proxy */