hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1243700 - in /hadoop/common/branches/branch-0.22/mapreduce: CHANGES.txt src/java/org/apache/hadoop/mapred/JobTracker.java
Date Mon, 13 Feb 2012 21:20:20 GMT
Author: shv
Date: Mon Feb 13 21:20:20 2012
New Revision: 1243700

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

Modified:
    hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
    hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt?rev=1243700&r1=1243699&r2=1243700&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt Mon Feb 13 21:20:20 2012
@@ -20,6 +20,9 @@ Release 0.22.1 - Unreleased
     MAPREDUCE-3725. hadoop job -list returns user name as NULL.
     (Mayank Bansal via shv)
 
+    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/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=1243700&r1=1243699&r2=1243700&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
(original)
+++ hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
Mon Feb 13 21:20:20 2012
@@ -1167,13 +1167,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 = 
+          final UserGroupInformation ugi = 
             UserGroupInformation.createRemoteUser(token.getUser().toString());
-          submitJob(token.getJobID(), restartCount, 
-              ugi, token.getJobSubmitDir().toString(), true, null);
+          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