Author: acmurthy Date: Fri Sep 27 19:10:07 2013 New Revision: 1527034 URL: http://svn.apache.org/r1527034 Log: Merge -c 1527033 from trunk to branch-2 to fix MAPREDUCE-5531. Fix compat with hadoop-1 in mapreduce.(TaskID, TaskAttemptID) by re-introducing missing constructors. Contributed by Robert Kanter.
Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt?rev=1527034&r1=1527033&r2=1527034&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt Fri Sep 27 19:10:07 2013 @@ -97,6 +97,10 @@ Release 2.1.2 - UNRELEASED MAPREDUCE-5513. ConcurrentModificationException in JobControl (Robert Parker via jlowe) + MAPREDUCE-5531. Fix compat with hadoop-1 in mapreduce.(TaskID, + TaskAttemptID) by re-introducing missing constructors. (Robert Kanter via + acmurthy) + Release 2.1.1-beta - 2013-09-23 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java?rev=1527034&r1=1527033&r2=1527034&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java (original) +++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskAttemptID.java Fri Sep 27 19:10:07 2013 @@ -76,6 +76,20 @@ public class TaskAttemptID extends org.a int taskId, int id) { this(new TaskID(jtIdentifier, jobId, type, taskId), id); } + + /** + * Constructs a TaskId object from given parts. + * @param jtIdentifier jobTracker identifier + * @param jobId job number + * @param isMap whether the tip is a map + * @param taskId taskId number + * @param id the task attempt number + */ + @Deprecated + public TaskAttemptID(String jtIdentifier, int jobId, boolean isMap, + int taskId, int id) { + this(new TaskID(jtIdentifier, jobId, isMap, taskId), id); + } public TaskAttemptID() { taskId = new TaskID(); Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java?rev=1527034&r1=1527033&r2=1527034&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java (original) +++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/TaskID.java Fri Sep 27 19:10:07 2013 @@ -91,6 +91,29 @@ public class TaskID extends org.apache.h public TaskID(String jtIdentifier, int jobId, TaskType type, int id) { this(new JobID(jtIdentifier, jobId), type, id); } + + /** + * Constructs a TaskID object from given {@link JobID}. + * @param jobId JobID that this tip belongs to + * @param isMap whether the tip is a map + * @param id the tip number + */ + @Deprecated + public TaskID(JobID jobId, boolean isMap, int id) { + this(jobId, isMap ? TaskType.MAP : TaskType.REDUCE, id); + } + + /** + * Constructs a TaskInProgressId object from given parts. + * @param jtIdentifier jobTracker identifier + * @param jobId job number + * @param isMap whether the tip is a map + * @param id the tip number + */ + @Deprecated + public TaskID(String jtIdentifier, int jobId, boolean isMap, int id) { + this(new JobID(jtIdentifier, jobId), isMap, id); + } public TaskID() { jobId = new JobID();