hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r399030 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java
Date Tue, 02 May 2006 20:07:49 GMT
Author: cutting
Date: Tue May  2 13:07:47 2006
New Revision: 399030

URL: http://svn.apache.org/viewcvs?rev=399030&view=rev
Log:
HADOOP-188.  More fixes to to JobClient, following on HADOOP-174.  Contributed by Owen.

Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java?rev=399030&r1=399029&r2=399030&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java Tue May  2 13:07:47
2006
@@ -308,26 +308,30 @@
         running = jc.submitJob(job);
         String jobId = running.getJobID();
         LOG.info("Running job: " + jobId);
-        while (!running.isComplete()) {
+        while (true) {
           try {
             Thread.sleep(1000);
           } catch (InterruptedException e) {}
           try {
+            if (running.isComplete()) {
+              break;
+            }
             running = jc.getJob(jobId);
+            String report = (" map " + Math.round(running.mapProgress()*100)+
+                             "%  reduce " + 
+                             Math.round(running.reduceProgress()*100) + "%");
+            if (!report.equals(lastReport)) {
+              LOG.info(report);
+              lastReport = report;
+            }
             retries = MAX_RETRIES;
           } catch (IOException ie) {
             if (--retries == 0) {
-              LOG.info("Final attempt failed, killing job.");
+              LOG.warning("Final attempt failed, killing job.");
               throw ie;
             }
             LOG.info("Communication problem with server: " +
                      StringUtils.stringifyException(ie));
-          }
-          String report = null;
-          report = " map "+Math.round(running.mapProgress()*100)+"%  reduce " + Math.round(running.reduceProgress()*100)+"%";
-          if (!report.equals(lastReport)) {
-            LOG.info(report);
-            lastReport = report;
           }
         }
         if (!running.isSuccessful()) {



Mime
View raw message