hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From templ...@apache.org
Subject hadoop git commit: YARN-5793. Trim configuration values in DockerLinuxContainerRuntime (Contributed by Tianyin Xu via Daniel Templeton)
Date Mon, 31 Oct 2016 21:01:23 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 c4ccafdaf -> 9d13a1316


YARN-5793. Trim configuration values in DockerLinuxContainerRuntime (Contributed by Tianyin
Xu via Daniel Templeton)

(cherry picked from commit f3eb4c3c738204e099cbaa03471497c46530efbf)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9d13a131
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9d13a131
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9d13a131

Branch: refs/heads/branch-2
Commit: 9d13a13160678506c28302f010a1728e722e79cc
Parents: c4ccafd
Author: Daniel Templeton <templedf@apache.org>
Authored: Mon Oct 31 13:51:07 2016 -0700
Committer: Daniel Templeton <templedf@apache.org>
Committed: Mon Oct 31 14:01:15 2016 -0700

----------------------------------------------------------------------
 .../linux/runtime/DockerLinuxContainerRuntime.java    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9d13a131/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/DockerLinuxContainerRuntime.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/DockerLinuxContainerRuntime.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/DockerLinuxContainerRuntime.java
index a3aff2f..b70a4e1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/DockerLinuxContainerRuntime.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/DockerLinuxContainerRuntime.java
@@ -219,9 +219,10 @@ public class DockerLinuxContainerRuntime implements LinuxContainerRuntime
{
     dockerClient = new DockerClient(conf);
     allowedNetworks.clear();
     allowedNetworks.addAll(Arrays.asList(
-        conf.getStrings(YarnConfiguration.NM_DOCKER_ALLOWED_CONTAINER_NETWORKS,
+        conf.getTrimmedStrings(
+            YarnConfiguration.NM_DOCKER_ALLOWED_CONTAINER_NETWORKS,
             YarnConfiguration.DEFAULT_NM_DOCKER_ALLOWED_CONTAINER_NETWORKS)));
-    defaultNetwork = conf.get(
+    defaultNetwork = conf.getTrimmed(
         YarnConfiguration.NM_DOCKER_DEFAULT_CONTAINER_NETWORK,
         YarnConfiguration.DEFAULT_NM_DOCKER_DEFAULT_CONTAINER_NETWORK);
 
@@ -237,7 +238,7 @@ public class DockerLinuxContainerRuntime implements LinuxContainerRuntime
{
       throw new ContainerExecutionException(message);
     }
 
-    privilegedContainersAcl = new AccessControlList(conf.get(
+    privilegedContainersAcl = new AccessControlList(conf.getTrimmed(
         YarnConfiguration.NM_DOCKER_PRIVILEGED_CONTAINERS_ACL,
         YarnConfiguration.DEFAULT_NM_DOCKER_PRIVILEGED_CONTAINERS_ACL));
   }
@@ -439,9 +440,10 @@ public class DockerLinuxContainerRuntime implements LinuxContainerRuntime
{
         LOCALIZED_RESOURCES);
     @SuppressWarnings("unchecked")
     List<String> userLocalDirs = ctx.getExecutionAttribute(USER_LOCAL_DIRS);
-    Set<String> capabilities = new HashSet<>(Arrays.asList(conf.getStrings(
-        YarnConfiguration.NM_DOCKER_CONTAINER_CAPABILITIES,
-        YarnConfiguration.DEFAULT_NM_DOCKER_CONTAINER_CAPABILITIES)));
+    Set<String> capabilities = new HashSet<>(Arrays.asList(
+        conf.getTrimmedStrings(
+            YarnConfiguration.NM_DOCKER_CONTAINER_CAPABILITIES,
+            YarnConfiguration.DEFAULT_NM_DOCKER_CONTAINER_CAPABILITIES)));
 
     @SuppressWarnings("unchecked")
     DockerRunCommand runCommand = new DockerRunCommand(containerIdStr,


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message