HADOOP-11599. Client#getTimeout should use IPC_CLIENT_PING_DEFAULT when IPC_CLIENT_PING_KEY is not configured. Contributed by zhihai xu.
This commit is contained in:
parent
b6fc1f3e43
commit
3f56a4cb0c
@ -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
|
||||
|
@ -236,7 +236,8 @@ final public static int getPingInterval(Configuration conf) {
|
||||
* @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;
|
||||
|
@ -1235,6 +1235,12 @@ public void run() {
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
|
Loading…
Reference in New Issue
Block a user