hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r758422 - in /hadoop/core/trunk: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobInProgress.java src/mapred/org/apache/hadoop/mapred/JobTracker.java src/mapred/org/apache/hadoop/mapred/JobTrackerInstrumentation.java
Date Wed, 25 Mar 2009 19:56:57 GMT
Author: cdouglas
Date: Wed Mar 25 19:56:51 2009
New Revision: 758422

URL: http://svn.apache.org/viewvc?rev=758422&view=rev
Log:
HADOOP-5565. Add API for failing/finalized jobs to the JT metrics
instrumentation. Contributed by Jerome Boulon

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTrackerInstrumentation.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=758422&r1=758421&r2=758422&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Mar 25 19:56:51 2009
@@ -1098,6 +1098,9 @@
     HADOOP-5564. Limit the JVM heap size in the java command for initializing
     JAVA_PLATFORM.  (Suresh Srinivas via szetszwo)
 
+    HADOOP-5565. Add API for failing/finalized jobs to the JT metrics
+    instrumentation. (Jerome Boulon via cdouglas)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java?rev=758422&r1=758421&r2=758422&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java Wed Mar 25 19:56:51
2009
@@ -2114,6 +2114,7 @@
   }
   
   private synchronized void terminateJob(int jobTerminationState) {
+    final JobTrackerInstrumentation metrics = jobtracker.getInstrumentation();
     if ((status.getRunState() == JobStatus.RUNNING) ||
         (status.getRunState() == JobStatus.PREP)) {
       if (jobTerminationState == JobStatus.FAILED) {
@@ -2134,6 +2135,7 @@
                                      this.finishedReduceTasks);
       }
       garbageCollect();
+      metrics.terminateJob(this.conf, this.status.getJobID());
     }
   }
 

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=758422&r1=758421&r2=758422&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java Wed Mar 25 19:56:51
2009
@@ -1894,6 +1894,9 @@
       LOG.info("Failed to finalize the log file recovery for job " + id, ioe);
     }
 
+    final JobTrackerInstrumentation metrics = getInstrumentation();
+    metrics.finalizeJob(conf, id);
+    
     long now = System.currentTimeMillis();
     
     // mark the job for cleanup at all the trackers

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTrackerInstrumentation.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTrackerInstrumentation.java?rev=758422&r1=758421&r2=758422&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTrackerInstrumentation.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTrackerInstrumentation.java Wed
Mar 25 19:56:51 2009
@@ -49,6 +49,12 @@
   public void completeJob(JobConf conf, JobID id) 
   { }
 
+  public void terminateJob(JobConf conf, JobID id) 
+  { }
+  
+  public void finalizeJob(JobConf conf, JobID id) 
+  { }
+  
   public void addWaiting(JobID id, int tasks)
   { }
 



Mime
View raw message