From 0f0caede29ed7ab95dc3f2f4b0c51b84570b5b9f Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Sat, 17 Nov 2012 06:08:06 +0000 Subject: [PATCH] MAPREDUCE-4800. Cleanup o.a.h.mapred.MapTaskStatus - remove unused code. (kkambatl via tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1410700 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../apache/hadoop/mapred/MapTaskStatus.java | 19 ++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index e70db35f00d..45a3a921fd8 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -199,6 +199,9 @@ Release 2.0.3-alpha - Unreleased MAPREDUCE-4777. In TestIFile, testIFileReaderWithCodec relies on testIFileWriterWithCodec. (Sandy Ryza via tomwhite) + MAPREDUCE-4800. Cleanup o.a.h.mapred.MapTaskStatus - remove unused + code. (kkambatl via tucu) + Release 2.0.2-alpha - 2012-09-07 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTaskStatus.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTaskStatus.java index fc78da2926a..89d7dd5da52 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTaskStatus.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTaskStatus.java @@ -25,8 +25,7 @@ import java.io.IOException; class MapTaskStatus extends TaskStatus { - private long mapFinishTime; - private long sortFinishTime; + private long mapFinishTime = 0; public MapTaskStatus() {} @@ -49,10 +48,10 @@ class MapTaskStatus extends TaskStatus { @Override void setFinishTime(long finishTime) { super.setFinishTime(finishTime); - if (mapFinishTime == 0) { - mapFinishTime = finishTime; + // set mapFinishTime if it hasn't been set before + if (getMapFinishTime() == 0) { + setMapFinishTime(finishTime); } - setSortFinishTime(finishTime); } @Override @@ -74,16 +73,6 @@ class MapTaskStatus extends TaskStatus { void setMapFinishTime(long mapFinishTime) { this.mapFinishTime = mapFinishTime; } - - @Override - public long getSortFinishTime() { - return sortFinishTime; - } - - @Override - void setSortFinishTime(long sortFinishTime) { - this.sortFinishTime = sortFinishTime; - } @Override synchronized void statusUpdate(TaskStatus status) {