You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by zh...@apache.org on 2015/02/23 20:36:53 UTC
[05/52] [abbrv] hadoop git commit: HADOOP-11599. Client#getTimeout
should use IPC_CLIENT_PING_DEFAULT when IPC_CLIENT_PING_KEY is not
configured. Contributed by zhihai xu.
HADOOP-11599. Client#getTimeout should use IPC_CLIENT_PING_DEFAULT when IPC_CLIENT_PING_KEY is not configured. Contributed by zhihai xu.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3f56a4cb
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3f56a4cb
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3f56a4cb
Branch: refs/heads/HDFS-7285
Commit: 3f56a4cb0c57583e285e85a4d0c1584c4de9f1f1
Parents: b6fc1f3
Author: Tsuyoshi Ozawa <oz...@apache.org>
Authored: Wed Feb 18 17:32:50 2015 +0900
Committer: Tsuyoshi Ozawa <oz...@apache.org>
Committed: Wed Feb 18 17:35:11 2015 +0900
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
.../src/main/java/org/apache/hadoop/ipc/Client.java | 3 ++-
.../src/test/java/org/apache/hadoop/ipc/TestIPC.java | 6 ++++++
3 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3f56a4cb/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index b3b2c95..f248555 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -959,6 +959,9 @@ Release 2.7.0 - UNRELEASED
HADOOP-11295. RPC Server Reader thread can't shutdown if RPCCallQueue is
full. (Ming Ma via kihwal)
+ HADOOP-11599. Client#getTimeout should use IPC_CLIENT_PING_DEFAULT when
+ IPC_CLIENT_PING_KEY is not configured. (zhihai xu via ozawa)
+
Release 2.6.1 - UNRELEASED
INCOMPATIBLE CHANGES
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3f56a4cb/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
index bdcb96c..3f93c42 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
@@ -236,7 +236,8 @@ public class Client {
* @return the timeout period in milliseconds. -1 if no timeout value is set
*/
final public static int getTimeout(Configuration conf) {
- if (!conf.getBoolean(CommonConfigurationKeys.IPC_CLIENT_PING_KEY, true)) {
+ if (!conf.getBoolean(CommonConfigurationKeys.IPC_CLIENT_PING_KEY,
+ CommonConfigurationKeys.IPC_CLIENT_PING_DEFAULT)) {
return getPingInterval(conf);
}
return -1;
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3f56a4cb/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java
index 04a7412..eb19f48 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java
@@ -1235,6 +1235,12 @@ public class TestIPC {
}
}
+ @Test
+ public void testClientGetTimeout() throws IOException {
+ Configuration config = new Configuration();
+ assertEquals(Client.getTimeout(config), -1);
+ }
+
private void assertRetriesOnSocketTimeouts(Configuration conf,
int maxTimeoutRetries) throws IOException {
SocketFactory mockFactory = Mockito.mock(SocketFactory.class);