From f967fd2f21791c5c4a5a090cc14ee88d155d2e2b Mon Sep 17 00:00:00 2001 From: Jian He Date: Mon, 20 Apr 2015 10:38:27 -0700 Subject: [PATCH] YARN-3497. ContainerManagementProtocolProxy modifies IPC timeout conf without making a copy. Contributed by Jason Lowe --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../client/api/impl/ContainerManagementProtocolProxy.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 71fde68115f..fa3061a4749 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -244,6 +244,9 @@ Release 2.7.1 - UNRELEASED YARN-3487. CapacityScheduler scheduler lock obtained unnecessarily when calling getQueue (Jason Lowe via wangda) + YARN-3497. ContainerManagementProtocolProxy modifies IPC timeout conf + without making a copy. (Jason Lowe via jianhe) + Release 2.7.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/ContainerManagementProtocolProxy.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/ContainerManagementProtocolProxy.java index eaf048d79d8..94ebf0d9efa 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/ContainerManagementProtocolProxy.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/ContainerManagementProtocolProxy.java @@ -67,7 +67,7 @@ public class ContainerManagementProtocolProxy { public ContainerManagementProtocolProxy(Configuration conf, NMTokenCache nmTokenCache) { - this.conf = conf; + this.conf = new Configuration(conf); this.nmTokenCache = nmTokenCache; maxConnectedNMs = @@ -88,7 +88,7 @@ public class ContainerManagementProtocolProxy { cmProxy = Collections.emptyMap(); // Connections are not being cached so ensure connections close quickly // to avoid creating thousands of RPC client threads on large clusters. - conf.setInt( + this.conf.setInt( CommonConfigurationKeysPublic.IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY, 0); }