hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1130187 - in /hadoop/mapreduce/branches/MR-279: CHANGES.txt mr-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedTask.java
Date Wed, 01 Jun 2011 15:26:36 GMT
Author: acmurthy
Date: Wed Jun  1 15:26:36 2011
New Revision: 1130187

URL: http://svn.apache.org/viewvc?rev=1130187&view=rev
Log:
MAPREDUCE-2552. Fixed NPE in CompletedJob in JobHistoryServer. Contributed by Siddharth Seth.

Modified:
    hadoop/mapreduce/branches/MR-279/CHANGES.txt
    hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedTask.java

Modified: hadoop/mapreduce/branches/MR-279/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/CHANGES.txt?rev=1130187&r1=1130186&r2=1130187&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/MR-279/CHANGES.txt Wed Jun  1 15:26:36 2011
@@ -4,6 +4,9 @@ Trunk (unreleased changes)
 
   MAPREDUCE-279
     
+    MAPREDUCE-2552. Fixed NPE in CompletedJob in JobHistoryServer.
+    (Siddharth Seth via acmurthy)
+     
     MAPREDUCE-2551. Added JobSummaryLog. (Siddharth Seth via acmurthy)
      
     Added ability to decommission nodes and completed RM administration tools

Modified: hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedTask.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedTask.java?rev=1130187&r1=1130186&r2=1130187&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedTask.java
(original)
+++ hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/CompletedTask.java
Wed Jun  1 15:26:36 2011
@@ -60,14 +60,19 @@ public class CompletedTask implements Ta
     this.counters = TypeConverter.toYarn(
         new org.apache.hadoop.mapred.Counters(taskinfo.getCounters()));
     this.state = TaskState.valueOf(taskinfo.getTaskStatus());
+    report = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(TaskReport.class);
     for (TaskAttemptInfo attemptHistory : 
                 taskinfo.getAllTaskAttempts().values()) {
       CompletedTaskAttempt attempt = new CompletedTaskAttempt(taskId, 
           attemptHistory);
       attempts.put(attempt.getID(), attempt);
+      if (attemptHistory.getState().equals(TaskState.SUCCEEDED.toString())
+          && report.getSuccessfulAttempt() == null) {
+        report.setSuccessfulAttempt(TypeConverter.toYarn(attemptHistory
+            .getAttemptId()));
+      }
     }
     
-    report = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(TaskReport.class);
     report.setTaskId(taskId);
     report.setStartTime(startTime);
     report.setFinishTime(finishTime);
@@ -75,7 +80,6 @@ public class CompletedTask implements Ta
     report.setProgress(getProgress());
     report.setCounters(getCounters());
     report.addAllRunningAttempts(new ArrayList<TaskAttemptId>(attempts.keySet()));
-    //report.successfulAttempt = taskHistory.; //TODO
   }
 
   @Override



Mime
View raw message