YARN-3497. ContainerManagementProtocolProxy modifies IPC timeout conf without making a copy. Contributed by Jason Lowe

(cherry picked from commit f967fd2f21)

Conflicts:
	hadoop-yarn-project/CHANGES.txt
This commit is contained in:
Jian He 2015-04-20 10:38:27 -07:00
parent d6105d944c
commit b493ec28a8
2 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,9 @@ Release 2.7.1 - UNRELEASED
YARN-3462. Patches applied for YARN-2424 are inconsistent between YARN-3462. Patches applied for YARN-2424 are inconsistent between
trunk and branch-2. (Naganarasimha G R via harsh) trunk and branch-2. (Naganarasimha G R via harsh)
YARN-3497. ContainerManagementProtocolProxy modifies IPC timeout conf
without making a copy. (Jason Lowe via jianhe)
Release 2.7.0 - UNRELEASED Release 2.7.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -67,7 +67,7 @@ public class ContainerManagementProtocolProxy {
public ContainerManagementProtocolProxy(Configuration conf, public ContainerManagementProtocolProxy(Configuration conf,
NMTokenCache nmTokenCache) { NMTokenCache nmTokenCache) {
this.conf = conf; this.conf = new Configuration(conf);
this.nmTokenCache = nmTokenCache; this.nmTokenCache = nmTokenCache;
maxConnectedNMs = maxConnectedNMs =
@ -88,7 +88,7 @@ public class ContainerManagementProtocolProxy {
cmProxy = Collections.emptyMap(); cmProxy = Collections.emptyMap();
// Connections are not being cached so ensure connections close quickly // Connections are not being cached so ensure connections close quickly
// to avoid creating thousands of RPC client threads on large clusters. // to avoid creating thousands of RPC client threads on large clusters.
conf.setInt( this.conf.setInt(
CommonConfigurationKeysPublic.IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY, CommonConfigurationKeysPublic.IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY,
0); 0);
} }