Ver Fonte

Merge -r 732612:732613 from trunk onto 0.20 branch. Fixes HADOOP-4963.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20@746878 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das há 16 anos atrás
pai
commit
dc2361e36d
2 ficheiros alterados com 8 adições e 0 exclusões
  1. 3 0
      CHANGES.txt
  2. 5 0
      src/mapred/org/apache/hadoop/mapred/TaskTracker.java

+ 3 - 0
CHANGES.txt

@@ -633,6 +633,9 @@ Release 0.20.0 - Unreleased
     HADOOP-5282. Fixed job history logs for task attempts that are failed by the
     HADOOP-5282. Fixed job history logs for task attempts that are failed by the
     JobTracker, say due to lost task trackers. (Amar Kamat via yhemanth)
     JobTracker, say due to lost task trackers. (Amar Kamat via yhemanth)
 
 
+    HADOOP-4963. Fixes a logging to do with getting the location of
+    map output file. (Amareshwari Sriramadasu via ddas)
+
 Release 0.19.1 - Unreleased
 Release 0.19.1 - Unreleased
 
 
   IMPROVEMENTS
   IMPROVEMENTS

+ 5 - 0
src/mapred/org/apache/hadoop/mapred/TaskTracker.java

@@ -1585,6 +1585,11 @@ public class TaskTracker
       if(tip == null)
       if(tip == null)
          return -1;
          return -1;
       
       
+      if (!tip.getTask().isMapTask() || 
+          tip.getRunState() != TaskStatus.State.SUCCEEDED) {
+        return -1;
+      }
+      
       MapOutputFile mapOutputFile = new MapOutputFile();
       MapOutputFile mapOutputFile = new MapOutputFile();
       mapOutputFile.setJobId(taskId.getJobID());
       mapOutputFile.setJobId(taskId.getJobID());
       mapOutputFile.setConf(conf);
       mapOutputFile.setConf(conf);