hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1497919 - in /hadoop/common/branches/branch-1.2: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JvmManager.java
Date Fri, 28 Jun 2013 20:55:16 GMT
Author: acmurthy
Date: Fri Jun 28 20:55:15 2013
New Revision: 1497919

URL: http://svn.apache.org/r1497919
Log:
Merge -c 1497918 from branch-1 to branch-1.2 to fix MAPREDUCE-5260. Fix JvmManager to deal
better with corner-cases in shutting down. Contributed by zhaoyunjiong.

Modified:
    hadoop/common/branches/branch-1.2/CHANGES.txt
    hadoop/common/branches/branch-1.2/src/mapred/org/apache/hadoop/mapred/JvmManager.java

Modified: hadoop/common/branches/branch-1.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.2/CHANGES.txt?rev=1497919&r1=1497918&r2=1497919&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.2/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1.2/CHANGES.txt Fri Jun 28 20:55:15 2013
@@ -32,6 +32,9 @@ Release 1.2.1 - Unreleased 
     HDFS-4261. Fix bugs in Balaner causing infinite loop and
     TestBalancerWithNodeGroup timeing out.  (Junping Du via szetszwo)
 
+    MAPREDUCE-5260. Fix JvmManager to deal better with corner-cases in
+    shutting down. (zhaoyunjiong via acmurthy) 
+
 Release 1.2.0 - 2013.05.05
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1.2/src/mapred/org/apache/hadoop/mapred/JvmManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.2/src/mapred/org/apache/hadoop/mapred/JvmManager.java?rev=1497919&r1=1497918&r2=1497919&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.2/src/mapred/org/apache/hadoop/mapred/JvmManager.java
(original)
+++ hadoop/common/branches/branch-1.2/src/mapred/org/apache/hadoop/mapred/JvmManager.java
Fri Jun 28 20:55:15 2013
@@ -384,11 +384,16 @@ class JvmManager {
         return;
       }
       //*MUST* never reach this
-      LOG.fatal("Inconsistent state!!! " +
-      		"JVM Manager reached an unstable state " +
-            "while reaping a JVM for task: " + t.getTask().getTaskID()+
-            " " + getDetails() + ". Aborting. ");
-      System.exit(-1);
+      try {
+        LOG.fatal("Inconsistent state!!! " +
+        		"JVM Manager reached an unstable state " +
+              "while reaping a JVM for task: " + t.getTask().getTaskID()+
+              " " + getDetails() + ". Aborting. ");
+      } catch (Exception e) {
+        LOG.fatal(e);
+      } finally {
+        System.exit(-1);
+      }
     }
     
     private String getDetails() {
@@ -548,13 +553,17 @@ class JvmManager {
           if (pidStr != null) {
             String user = env.conf.getUser();
             int pid = Integer.parseInt(pidStr);
-            // start a thread that will kill the process dead
-            if (sleeptimeBeforeSigkill > 0) {
-              new DelayedProcessKiller(user, pid, sleeptimeBeforeSigkill, 
-                                       Signal.KILL).start();
-              controller.signalTask(user, pid, Signal.TERM);
-            } else {
-              controller.signalTask(user, pid, Signal.KILL);
+            try {
+              // start a thread that will kill the process dead
+              if (sleeptimeBeforeSigkill > 0) {
+                new DelayedProcessKiller(user, pid, sleeptimeBeforeSigkill, 
+                                         Signal.KILL).start();
+                controller.signalTask(user, pid, Signal.TERM);
+              } else {
+                controller.signalTask(user, pid, Signal.KILL);
+              }
+            } catch (IOException e) {
+              LOG.error("Catch Exception caused by lack of user information to prevent inconsistent
state: ", e);
             }
           } else {
             LOG.info(String.format("JVM Not killed %s but just removed", jvmId



Mime
View raw message