From a9f552cb33193de3de49903974ed660739ad6745 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 21 Feb 2013 11:44:50 +0000 Subject: [PATCH] Merge -r 1448601:1448602 from trunk to branch-2. Fixes: MAPREDUCE-5013. mapred.JobStatus compatibility: MR2 missing constructors from MR1. Contributed by Sandy Ryza. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1448604 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 ++ .../org/apache/hadoop/mapred/JobStatus.java | 53 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index f88dade0cac..ec7f37cb688 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -25,6 +25,9 @@ Release 2.0.4-beta - UNRELEASED MAPREDUCE-4846. Some JobQueueInfo methods are public in MR1 but protected in MR2. (Sandy Ryza via tomwhite) + MAPREDUCE-5013. mapred.JobStatus compatibility: MR2 missing constructors + from MR1. (Sandy Ryza via tomwhite) + Release 2.0.3-alpha - 2013-02-06 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobStatus.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobStatus.java index ca70291e8a4..e657a1a940d 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobStatus.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobStatus.java @@ -77,6 +77,59 @@ public class JobStatus extends org.apache.hadoop.mapreduce.JobStatus { */ public JobStatus() { } + + @Deprecated + public JobStatus(JobID jobid, float mapProgress, float reduceProgress, + float cleanupProgress, int runState) { + this(jobid, mapProgress, reduceProgress, cleanupProgress, runState, null, + null, null, null); + } + + /** + * Create a job status object for a given jobid. + * @param jobid The jobid of the job + * @param mapProgress The progress made on the maps + * @param reduceProgress The progress made on the reduces + * @param runState The current state of the job + */ + @Deprecated + public JobStatus(JobID jobid, float mapProgress, float reduceProgress, + int runState) { + this (jobid, mapProgress, reduceProgress, runState, null, null, null, null); + } + + /** + * Create a job status object for a given jobid. + * @param jobid The jobid of the job + * @param mapProgress The progress made on the maps + * @param reduceProgress The progress made on the reduces + * @param runState The current state of the job + * @param jp Priority of the job. + */ + @Deprecated + public JobStatus(JobID jobid, float mapProgress, float reduceProgress, + float cleanupProgress, int runState, JobPriority jp) { + this(jobid, mapProgress, reduceProgress, cleanupProgress, runState, jp, + null, null, null, null); + } + + /** + * Create a job status object for a given jobid. + * @param jobid The jobid of the job + * @param setupProgress The progress made on the setup + * @param mapProgress The progress made on the maps + * @param reduceProgress The progress made on the reduces + * @param cleanupProgress The progress made on the cleanup + * @param runState The current state of the job + * @param jp Priority of the job. + */ + @Deprecated + public JobStatus(JobID jobid, float setupProgress, float mapProgress, + float reduceProgress, float cleanupProgress, + int runState, JobPriority jp) { + this(jobid, setupProgress, mapProgress, reduceProgress, cleanupProgress, + runState, jp, null, null, null, null); + } /** * Create a job status object for a given jobid.