hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r765891 - in /hadoop/core/branches/branch-0.20: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobTracker.java
Date Fri, 17 Apr 2009 08:00:05 GMT
Author: sharad
Date: Fri Apr 17 08:00:04 2009
New Revision: 765891

URL: http://svn.apache.org/viewvc?rev=765891&view=rev
Log:
merge -r 765886:765887 to backport HADOOP-5533 to branch 0.20.

Modified:
    hadoop/core/branches/branch-0.20/CHANGES.txt
    hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=765891&r1=765890&r2=765891&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Fri Apr 17 08:00:04 2009
@@ -875,6 +875,9 @@
     HADOOP-5655. TestMRServerPorts fails on java.net.BindException. (Devaraj
     Das via hairong)
 
+    HADOOP-5533. Recovery duration shown on the jobtracker webpage is 
+    inaccurate. (Amar Kamat via sharad)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=765891&r1=765890&r2=765891&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java Fri
Apr 17 08:00:04 2009
@@ -1194,13 +1194,15 @@
     }
 
     public void recover() {
+      long recoveryProcessStartTime = System.currentTimeMillis();
       if (!shouldRecover()) {
         // clean up jobs structure
         jobsToRecover.clear();
         return;
       }
 
-      LOG.info("Restart count of the jobtracker : " + restartCount);
+      LOG.info("Starting the recovery process with restart count : " 
+               + restartCount);
 
       // I. Init the jobs and cache the recovered job history filenames
       Map<JobID, Path> jobHistoryFilenameMap = new HashMap<JobID, Path>();
@@ -1256,6 +1258,11 @@
         }
       }
 
+      LOG.info("Took a total of " 
+               + StringUtils.formatTime(System.currentTimeMillis() 
+                                        - recoveryProcessStartTime) 
+               + " for recovering filenames of all the jobs from history.");
+
       long recoveryStartTime = System.currentTimeMillis();
 
       // II. Recover each job
@@ -1313,14 +1320,21 @@
         }
       }
 
-      recoveryDuration = System.currentTimeMillis() - recoveryStartTime;
+      long recoveryProcessEndTime = System.currentTimeMillis();
+      LOG.info("Took a total of " 
+               + StringUtils.formatTime(recoveryProcessEndTime
+                                        - recoveryStartTime) 
+               + " for parsing and recovering all the jobs from history.");
+
+      recoveryDuration = recoveryProcessEndTime - recoveryProcessStartTime;
+      LOG.info("Took a total of " + StringUtils.formatTime(recoveryDuration) 
+               + " for the whole recovery process.");
       hasRecovered = true;
 
       // III. Finalize the recovery
       synchronized (trackerExpiryQueue) {
         // Make sure that the tracker statuses in the expiry-tracker queue
         // are updated
-        long now = System.currentTimeMillis();
         int size = trackerExpiryQueue.size();
         for (int i = 0; i < size ; ++i) {
           // Get the first status
@@ -1330,14 +1344,14 @@
           trackerExpiryQueue.remove(status);
 
           // Set the new time
-          status.setLastSeen(now);
+          status.setLastSeen(recoveryProcessEndTime);
 
           // Add back to get the sorted list
           trackerExpiryQueue.add(status);
         }
       }
 
-      LOG.info("Restoration complete");
+      LOG.info("Restoration done. Recovery complete!");
     }
     
     int totalEventsRecovered() {



Mime
View raw message