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/branches/branch-0.23@1243698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
87cd58b0f9
commit
10c7f0eb15
|
@ -2649,6 +2649,9 @@ Release 0.22.1 - Unreleased
|
||||||
|
|
||||||
BUG FIXES
|
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
|
Release 0.22.0 - 2011-11-29
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -1192,13 +1192,17 @@ public class JobTracker implements MRConstants, InterTrackerProtocol,
|
||||||
try {
|
try {
|
||||||
Path jobInfoFile = getSystemFileForJob(jobId);
|
Path jobInfoFile = getSystemFileForJob(jobId);
|
||||||
FSDataInputStream in = fs.open(jobInfoFile);
|
FSDataInputStream in = fs.open(jobInfoFile);
|
||||||
JobInfo token = new JobInfo();
|
final JobInfo token = new JobInfo();
|
||||||
token.readFields(in);
|
token.readFields(in);
|
||||||
in.close();
|
in.close();
|
||||||
UserGroupInformation ugi =
|
final UserGroupInformation ugi =
|
||||||
UserGroupInformation.createRemoteUser(token.getUser().toString());
|
UserGroupInformation.createRemoteUser(token.getUser().toString());
|
||||||
submitJob(token.getJobID(), restartCount,
|
ugi.doAs(new PrivilegedExceptionAction<JobStatus>() {
|
||||||
ugi, token.getJobSubmitDir().toString(), true, null);
|
public JobStatus run() throws IOException ,InterruptedException{
|
||||||
|
return submitJob(token.getJobID(), restartCount,
|
||||||
|
ugi, token.getJobSubmitDir().toString(), true, null);
|
||||||
|
}});
|
||||||
|
|
||||||
recovered++;
|
recovered++;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.warn("Could not recover job " + jobId, e);
|
LOG.warn("Could not recover job " + jobId, e);
|
||||||
|
|
Loading…
Reference in New Issue