hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1243695 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt src/java/org/apache/hadoop/mapred/JobTracker.java
Date Mon, 13 Feb 2012 21:12:04 GMT
Author: shv
Date: Mon Feb 13 21:12:03 2012
New Revision: 1243695

URL: http://svn.apache.org/viewvc?rev=1243695&view=rev
Log:
MAPREDUCE-3837. Job tracker is not able to recover jobs after crash. Contributed by Mayank
Bansal.

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1243695&r1=1243694&r2=1243695&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Mon Feb 13 21:12:03 2012
@@ -2682,6 +2682,9 @@ Release 0.22.1 - Unreleased
 
   BUG FIXES
 
+    MAPREDUCE-3837. Job tracker is not able to recover jobs after crash.
+    (Mayank Bansal via shv) 
+
 Release 0.22.0 - 2011-11-29
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=1243695&r1=1243694&r2=1243695&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobTracker.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobTracker.java
Mon Feb 13 21:12:03 2012
@@ -1192,13 +1192,17 @@ public class JobTracker implements MRCon
         try {
           Path jobInfoFile = getSystemFileForJob(jobId);
           FSDataInputStream in = fs.open(jobInfoFile);
-          JobInfo token = new JobInfo();
+          final JobInfo token = new JobInfo();
           token.readFields(in);
           in.close();
-          UserGroupInformation ugi = 
-            UserGroupInformation.createRemoteUser(token.getUser().toString());
-          submitJob(token.getJobID(), restartCount, 
-              ugi, token.getJobSubmitDir().toString(), true, null);
+          final UserGroupInformation ugi = 
+          UserGroupInformation.createRemoteUser(token.getUser().toString());
+          ugi.doAs(new PrivilegedExceptionAction<JobStatus>() {
+            public JobStatus run() throws IOException ,InterruptedException{
+               return submitJob(token.getJobID(), restartCount, 
+                        ugi, token.getJobSubmitDir().toString(), true, null);
+          }});
+          
           recovered++;
         } catch (Exception e) {
           LOG.warn("Could not recover job " + jobId, e);



Mime
View raw message