hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject [24/35] hadoop git commit: YARN-4643. Container recovery is broken with delegating container runtime. Contributed by Sidharta Seethana
Date Fri, 29 Jan 2016 16:29:27 GMT
YARN-4643. Container recovery is broken with delegating container runtime. Contributed by Sidharta
Seethana


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

Branch: refs/heads/YARN-1011
Commit: 61382ff8fabc76b3a51f227646573cdf367fea1a
Parents: ef343be
Author: Jason Lowe <jlowe@apache.org>
Authored: Thu Jan 28 18:59:35 2016 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Thu Jan 28 18:59:35 2016 +0000

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                             | 3 +++
 .../containermanager/launcher/RecoveredContainerLaunch.java | 7 ++++---
 .../yarn/server/nodemanager/TestLinuxContainerExecutor.java | 9 +++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/61382ff8/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index c8a8c06..1b57a3d 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -1345,6 +1345,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4520. Finished app info is unnecessarily persisted in NM state-store
     if container is acquired but not lunched on this node. (sandflee via jianeh)
 
+    YARN-4643. Container recovery is broken with delegating container runtime
+    (Sidharta Seethana via jlowe)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/61382ff8/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/RecoveredContainerLaunch.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/launcher/RecoveredContainerLaunch.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/RecoveredContainerLaunch.java
index d7b9ae2..66f5a2a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/RecoveredContainerLaunch.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/RecoveredContainerLaunch.java
@@ -83,9 +83,10 @@ public class RecoveredContainerLaunch extends ContainerLaunch {
         exec.activateContainer(containerId, pidFilePath);
         retCode = exec.reacquireContainer(
             new ContainerReacquisitionContext.Builder()
-            .setUser(container.getUser())
-            .setContainerId(containerId)
-            .build());
+                .setContainer(container)
+                .setUser(container.getUser())
+                .setContainerId(containerId)
+                .build());
       } else {
         LOG.warn("Unable to locate pid file for container " + containerIdStr);
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/61382ff8/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutor.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutor.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutor.java
index 58debc9..88ebf8d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutor.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutor.java
@@ -629,7 +629,16 @@ public class TestLinuxContainerExecutor {
     } catch (IOException e) {
       // expected if LCE isn't setup right, but not necessary for this test
     }
+
+    Container container = mock(Container.class);
+    ContainerLaunchContext context = mock(ContainerLaunchContext.class);
+    HashMap<String, String> env = new HashMap<>();
+
+    when(container.getLaunchContext()).thenReturn(context);
+    when(context.getEnvironment()).thenReturn(env);
+
     lce.reacquireContainer(new ContainerReacquisitionContext.Builder()
+        .setContainer(container)
         .setUser("foouser")
         .setContainerId(cid)
         .build());


Mime
View raw message