MAPREDUCE-5544. JobClient#getJob loads job conf twice. (Sandy Ryza)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1528196 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sanford Ryza 2013-10-01 20:01:20 +00:00
parent ae05623a75
commit cc8a0cab59
2 changed files with 10 additions and 2 deletions

View File

@ -253,6 +253,8 @@ Release 2.1.2 - UNRELEASED
SequenceFileAsBinaryOutputFormat.WritableValueBytes by re-introducing SequenceFileAsBinaryOutputFormat.WritableValueBytes by re-introducing
missing constructors. (Zhijie Shen via acmurthy) missing constructors. (Zhijie Shen via acmurthy)
MAPREDUCE-5544. JobClient#getJob loads job conf twice. (Sandy Ryza)
Release 2.1.1-beta - 2013-09-23 Release 2.1.1-beta - 2013-09-23
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -173,7 +173,12 @@ static class NetworkedJob implements RunningJob {
* job completes.) * job completes.)
*/ */
public NetworkedJob(JobStatus status, Cluster cluster) throws IOException { public NetworkedJob(JobStatus status, Cluster cluster) throws IOException {
job = Job.getInstance(cluster, status, new JobConf(status.getJobFile())); this(status, cluster, new JobConf(status.getJobFile()));
}
private NetworkedJob(JobStatus status, Cluster cluster, JobConf conf)
throws IOException {
this(Job.getInstance(cluster, status, conf));
} }
public NetworkedJob(Job job) throws IOException { public NetworkedJob(Job job) throws IOException {
@ -592,7 +597,8 @@ public RunningJob getJob(final JobID jobid) throws IOException {
if (job != null) { if (job != null) {
JobStatus status = JobStatus.downgrade(job.getStatus()); JobStatus status = JobStatus.downgrade(job.getStatus());
if (status != null) { if (status != null) {
return new NetworkedJob(status, cluster); return new NetworkedJob(status, cluster,
new JobConf(job.getConfiguration()));
} }
} }
} catch (InterruptedException ie) { } catch (InterruptedException ie) {