hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r760376 - in /hadoop/core/trunk: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JvmManager.java
Date Tue, 31 Mar 2009 09:08:53 GMT
Author: ddas
Date: Tue Mar 31 09:08:48 2009
New Revision: 760376

URL: http://svn.apache.org/viewvc?rev=760376&view=rev
Log:
HADOOP-5198. Fixes a problem to do with the task PID file being absent and the JvmManager
trying to look for it. Contributed by Amareshwari Sriramadasu.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JvmManager.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=760376&r1=760375&r2=760376&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Mar 31 09:08:48 2009
@@ -342,6 +342,9 @@
     HADOOP-5322. Fix misleading/outdated comments in JobInProgress.
     (Amareshwari Sriramadasu via cdouglas)
 
+    HADOOP-5198. Fixes a problem to do with the task PID file being absent and 
+    the JvmManager trying to look for it. (Amareshwari Sriramadasu via ddas)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JvmManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JvmManager.java?rev=760376&r1=760375&r2=760376&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JvmManager.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JvmManager.java Tue Mar 31 09:08:48
2009
@@ -374,16 +374,17 @@
               Path pidFilePath = new Path(env.pidFile);
               String pid = ProcessTree.getPidFromPidFile(
                                                     pidFilePath.toString());
+              if (pid != null) {
+                long sleeptimeBeforeSigkill = env.conf.getLong(
+                     "mapred.tasktracker.tasks.sleeptime-before-sigkill",
+                     ProcessTree.DEFAULT_SLEEPTIME_BEFORE_SIGKILL);
 
-              long sleeptimeBeforeSigkill = env.conf.getLong(
-                   "mapred.tasktracker.tasks.sleeptime-before-sigkill",
-                   ProcessTree.DEFAULT_SLEEPTIME_BEFORE_SIGKILL);
-
-              ProcessTree.destroy(pid, sleeptimeBeforeSigkill,
-                       ProcessTree.isSetsidAvailable, false);
-              try {
-                LOG.info("Process exited with exit code:" + process.waitFor());
-              } catch (InterruptedException ie) {}
+                ProcessTree.destroy(pid, sleeptimeBeforeSigkill,
+                         ProcessTree.isSetsidAvailable, false);
+                try {
+                  LOG.info("Process exited with exit code:" + process.waitFor());
+                } catch (InterruptedException ie) {}
+              }
             }
           }
         }



Mime
View raw message