You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2007/01/31 23:13:30 UTC

svn commit: r502019 - in /lucene/hadoop/trunk: CHANGES.txt src/webapps/job/jobdetailshistory.jsp

Author: cutting
Date: Wed Jan 31 14:13:29 2007
New Revision: 502019

URL: http://svn.apache.org/viewvc?view=rev&rev=502019
Log:
HADOOP-881.  Fix JobTracker web interface to display the correct number of task failures.  Contributed by Sanjay.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/webapps/job/jobdetailshistory.jsp

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=502019&r1=502018&r2=502019
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Jan 31 14:13:29 2007
@@ -111,6 +111,9 @@
 34. HADOOP-934.  Fix TaskTracker to catch metrics exceptions that were
     causing heartbeats to fail.  (Arun Murthy via cutting)
 
+35. HADOOP-881.  Fix JobTracker web interface to display the correct
+    number of task failures.  (Sanjay Dahiya via cutting)
+
 
 Release 0.10.1 - 2007-01-10
 

Modified: lucene/hadoop/trunk/src/webapps/job/jobdetailshistory.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/webapps/job/jobdetailshistory.jsp?view=diff&rev=502019&r1=502018&r2=502019
==============================================================================
--- lucene/hadoop/trunk/src/webapps/job/jobdetailshistory.jsp (original)
+++ lucene/hadoop/trunk/src/webapps/job/jobdetailshistory.jsp Wed Jan 31 14:13:29 2007
@@ -50,26 +50,33 @@
 	  long finishTime = task.getLong(Keys.FINISH_TIME) ; 
 	  
 	  if( Values.MAP.name().equals(task.get(Keys.TASK_TYPE)) ){
-	    totalMaps++; 
 	    if( mapStarted==0 || mapStarted > startTime ){
 	      mapStarted = startTime; 
 	    }
 	    if(  mapFinished < finishTime ){
 	      mapFinished = finishTime ; 
 	    }
-	    if(Values.FAILED.name().equals(task.get(Keys.TASK_STATUS) ))  {
-	      failedMaps++; 
+	    
+	    Map<String, TaskAttempt> attempts = task.getTaskAttempts();
+	    for( TaskAttempt attempt : attempts.values() ) {
+	        totalMaps++; 
+	        if( Values.FAILED.name().equals(attempt.get(Keys.TASK_STATUS)) ) {
+	            failedMaps++; 
+	        }
 	    }
 	  }else{
-	    totalReduces++; 
 	    if( reduceStarted==0||reduceStarted > startTime ){
 	      reduceStarted = startTime ; 
 	    }
 	    if(  reduceFinished < finishTime ){
 	      reduceFinished = finishTime; 
 	    }
-	    if( Values.FAILED.name().equals(task.get(Keys.TASK_STATUS) ))  {
-	      failedReduces++; 
+	    Map<String, TaskAttempt> attempts = task.getTaskAttempts();
+	    for( TaskAttempt attempt : attempts.values() ) {
+	        totalReduces++; 
+	        if( Values.FAILED.name().equals(attempt.get(Keys.TASK_STATUS)) ) {
+	            failedReduces++; 
+	        }
 	    }
 	  }
 	}