hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1096076 - in /hadoop/common/branches/branch-0.20-security: CHANGES.txt src/mapred/org/apache/hadoop/mapred/Child.java src/mapred/org/apache/hadoop/mapred/TaskTracker.java src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
Date Fri, 22 Apr 2011 23:02:04 GMT
Author: acmurthy
Date: Fri Apr 22 23:02:03 2011
New Revision: 1096076

URL: http://svn.apache.org/viewvc?rev=1096076&view=rev
Log:
MAPREDUCE-2447. Fix Child.java to set Task.jvmContext sooner to avoid corner cases in error
handling. Contributed by Siddharth Seth. 

Modified:
    hadoop/common/branches/branch-0.20-security/CHANGES.txt
    hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/Child.java
    hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
    hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java

Modified: hadoop/common/branches/branch-0.20-security/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/CHANGES.txt?rev=1096076&r1=1096075&r2=1096076&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security/CHANGES.txt Fri Apr 22 23:02:03 2011
@@ -4,6 +4,9 @@ Release 0.20.204.0 - unreleased
 
   BUG FIXES
 
+    MAPREDUCE-2447. Fix Child.java to set Task.jvmContext sooner to avoid
+    corner cases in error handling. (Siddharth Seth via acmurthy) 
+
     MAPREDUCE-2429. Validate JVM in TaskUmbilicalProtocol. (Siddharth Seth via
     acmurthy) 
 

Modified: hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/Child.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/Child.java?rev=1096076&r1=1096075&r2=1096076&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/Child.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/Child.java
Fri Apr 22 23:02:03 2011
@@ -195,6 +195,7 @@ class Child {
         }
         idleLoopCount = 0;
         task = myTask.getTask();
+        task.setJvmContext(jvmContext);
         taskid = task.getTaskID();
 
         // Create the JobConf and determine if this job gets segmented task logs
@@ -251,7 +252,6 @@ class Child {
         
         // Create a final reference to the task for the doAs block
         final Task taskFinal = task;
-        taskFinal.setJvmContext(jvmContext);
         childUGI.doAs(new PrivilegedExceptionAction<Object>() {
           @Override
           public Object run() throws Exception {

Modified: hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=1096076&r1=1096075&r2=1096076&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
Fri Apr 22 23:02:03 2011
@@ -3116,6 +3116,10 @@ public class TaskTracker implements MRCo
   }
   
   private void validateJVM(TaskInProgress tip, JvmContext jvmContext, TaskAttemptID taskid)
throws IOException {
+    if (jvmContext == null) {
+      LOG.warn("Null jvmContext. Cannot verify Jvm. validateJvm throwing exception");
+      throw new IOException("JvmValidate Failed. JvmContext is null - cannot validate JVM");
+    }
     if (!jvmManager.validateTipToJvm(tip, jvmContext.jvmId)) {
       throw new IOException("JvmValidate Failed. Ignoring request from task: " + taskid +
", with JvmId: " + jvmContext.jvmId);
     }

Modified: hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java?rev=1096076&r1=1096075&r2=1096076&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java
Fri Apr 22 23:02:03 2011
@@ -84,7 +84,7 @@ public interface TaskUmbilicalProtocol e
    * @return True if the task is known
    */
   boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus,
-      JvmContext context) throws IOException, InterruptedException;
+      JvmContext jvmContext) throws IOException, InterruptedException;
   
   /** Report error messages back to parent.  Calls should be sparing, since all
    *  such messages are held in the job tracker.



Mime
View raw message