MAPREDUCE-3837. Job tracker is not able to recover jobs after crash. Contributed by Mayank Bansal.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1243695 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2acafd1783
commit
ce778462ee
|
@ -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
|
||||
|
|
|
@ -1192,13 +1192,17 @@ public class JobTracker implements MRConstants, InterTrackerProtocol,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue