hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tgra...@apache.org
Subject svn commit: r1461242 - in /hadoop/common/branches/branch-2/hadoop-tools: hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobFactory.java hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java
Date Tue, 26 Mar 2013 17:52:40 GMT
Author: tgraves
Date: Tue Mar 26 17:52:40 2013
New Revision: 1461242

URL: http://svn.apache.org/r1461242
Log:
MAPREDUCE-3953. [Gridmix] Gridmix throws NPE and does not simulate a job if the trace contains
null taskStatus for a task.  (ravigummadi via tgraves)

Modified:
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java

Modified: hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobFactory.java?rev=1461242&r1=1461241&r2=1461242&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
Tue Mar 26 17:52:40 2013
@@ -215,7 +215,13 @@ abstract class JobFactory<T> implements 
     return null == job ? null : new FilterJobStory(job) {
       @Override
       public TaskInfo getTaskInfo(TaskType taskType, int taskNumber) {
-        return new MinTaskInfo(this.job.getTaskInfo(taskType, taskNumber));
+        TaskInfo info = this.job.getTaskInfo(taskType, taskNumber);
+        if (info != null) {
+          info = new MinTaskInfo(info);
+        } else {
+          info = new MinTaskInfo(new TaskInfo(0, 0, 0, 0, 0));
+        }
+        return info;
       }
     };
   }

Modified: hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java?rev=1461242&r1=1461241&r2=1461242&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java
Tue Mar 26 17:52:40 2013
@@ -638,6 +638,9 @@ public class ZombieJob implements JobSto
   }
 
   private TaskInfo getTaskInfo(LoggedTask loggedTask) {
+    if (loggedTask == null) {
+      return new TaskInfo(0, 0, 0, 0, 0);
+    }
     List<LoggedTaskAttempt> attempts = loggedTask.getAttempts();
 
     long inputBytes = -1;



Mime
View raw message