浏览代码

MAPREDUCE-3485. DISKS_FAILED -101 error code should be defined in same location as ABORTED_CONTAINER_EXIT_STATUS. (Ravi Gummadi via mahadev) - Merging r1210192 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1210194 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 13 年之前
父节点
当前提交
63c0db36e2

+ 3 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -191,6 +191,9 @@ Release 0.23.1 - Unreleased
     MAPREDUCE-3458. Fix findbugs warnings in hadoop-examples. (Devaraj K
     MAPREDUCE-3458. Fix findbugs warnings in hadoop-examples. (Devaraj K
     via mahadev)
     via mahadev)
 
 
+    MAPREDUCE-3485. DISKS_FAILED -101 error code should be defined in same location as 
+    ABORTED_CONTAINER_EXIT_STATUS. (Ravi Gummadi via mahadev)
+
 Release 0.23.0 - 2011-11-01 
 Release 0.23.0 - 2011-11-01 
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 5 - 0
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java

@@ -73,6 +73,11 @@ public interface ContainerStatus {
    * <p>Container killed by the framework, either due to being released by
    * <p>Container killed by the framework, either due to being released by
    * the application or being 'lost' due to node failures etc. have a special
    * the application or being 'lost' due to node failures etc. have a special
    * exit code of {@literal -100}.</p>
    * exit code of {@literal -100}.</p>
+   * 
+   * <p>When threshold number of the nodemanager-local-directories or
+   * threshold number of the nodemanager-log-directories become bad, then
+   * container is not launched and is exited with exit status of
+   * {@literal -101}.</p>
    *  
    *  
    * @return <em>exit status</em> for the container
    * @return <em>exit status</em> for the container
    */
    */

+ 1 - 0
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java

@@ -431,6 +431,7 @@ public class YarnConfiguration extends Configuration {
 
 
   public static final int INVALID_CONTAINER_EXIT_STATUS = -1000;
   public static final int INVALID_CONTAINER_EXIT_STATUS = -1000;
   public static final int ABORTED_CONTAINER_EXIT_STATUS = -100;
   public static final int ABORTED_CONTAINER_EXIT_STATUS = -100;
+  public static final int DISKS_FAILED = -101;
 
 
   ////////////////////////////////
   ////////////////////////////////
   // Web Proxy Configs
   // Web Proxy Configs

+ 1 - 2
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java

@@ -122,8 +122,7 @@ public abstract class ContainerExecutor implements Configurable {
 
 
   public enum ExitCode {
   public enum ExitCode {
     FORCE_KILLED(137),
     FORCE_KILLED(137),
-    TERMINATED(143),
-    DISKS_FAILED(-101);
+    TERMINATED(143);
     private final int code;
     private final int code;
 
 
     private ExitCode(int exitCode) {
     private ExitCode(int exitCode) {

+ 1 - 1
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java

@@ -181,7 +181,7 @@ public class ContainerLaunch implements Callable<Integer> {
       List<String> logDirs = dirsHandler.getLogDirs();
       List<String> logDirs = dirsHandler.getLogDirs();
 
 
       if (!dirsHandler.areDisksHealthy()) {
       if (!dirsHandler.areDisksHealthy()) {
-        ret = ExitCode.DISKS_FAILED.getExitCode();
+        ret = YarnConfiguration.DISKS_FAILED;
         throw new IOException("Most of the disks failed. "
         throw new IOException("Most of the disks failed. "
             + dirsHandler.getDisksHealthReport());
             + dirsHandler.getDisksHealthReport());
       }
       }

+ 4 - 3
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/ClusterSetup.apt.vm

@@ -403,9 +403,10 @@ Hadoop MapReduce Next Generation - Cluster Setup
     the health of the local disks (specifically checks nodemanager-local-dirs
     the health of the local disks (specifically checks nodemanager-local-dirs
     and nodemanager-log-dirs) and after reaching the threshold of number of
     and nodemanager-log-dirs) and after reaching the threshold of number of
     bad directories based on the value set for the config property
     bad directories based on the value set for the config property
-    yarn.nodemanager.disk-health-checker.min-healthy-disks. The boot disk is
-    either raided or a failure in the boot disk is identified by the health
-    checker script.
+    yarn.nodemanager.disk-health-checker.min-healthy-disks, the whole node is
+    marked unhealthy and this info is sent to resource manager also. The boot
+    disk is either raided or a failure in the boot disk is identified by the
+    health checker script.
 
 
     * {Slaves file}
     * {Slaves file}