From 3b3a85002d869fe735db59929bfd1872dbd68a47 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Fri, 22 Jun 2018 19:12:48 -0400 Subject: [PATCH] YARN-8326. Removed exit code file check for launched container. Contributed by Shane Kumpf (cherry picked from commit 8a32bc39eb210fca8052c472601e24c2446b4cc2) --- .../launcher/ContainerLaunch.java | 19 ------------------- 1 file changed, 19 deletions(-) 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/ContainerLaunch.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/ContainerLaunch.java index d43c0694bf4..550863a20ad 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/ContainerLaunch.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/ContainerLaunch.java @@ -817,25 +817,6 @@ public class ContainerLaunch implements Callable { } } - final int sleepMsec = 100; - int msecLeft = 2000; - if (pidFilePath != null) { - File file = new File(getExitCodeFile(pidFilePath.toString())); - while (!file.exists() && msecLeft >= 0) { - try { - Thread.sleep(sleepMsec); - } catch (InterruptedException e) { - } - msecLeft -= sleepMsec; - } - if (msecLeft < 0) { - if (LOG.isDebugEnabled()) { - LOG.debug("Timeout while waiting for the exit code file: " - + file.getAbsolutePath()); - } - } - } - // Reap the container boolean result = exec.reapContainer( new ContainerReapContext.Builder()