You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by cu...@apache.org on 2005/07/18 22:48:50 UTC
svn commit: r219564 -
/lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobClient.java
Author: cutting
Date: Mon Jul 18 13:47:07 2005
New Revision: 219564
URL: http://svn.apache.org/viewcvs?rev=219564&view=rev
Log:
Don't log the same report twice.
Modified:
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobClient.java
Modified: lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobClient.java
URL: http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobClient.java?rev=219564&r1=219563&r2=219564&view=diff
==============================================================================
--- lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobClient.java (original)
+++ lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobClient.java Mon Jul 18 13:47:07 2005
@@ -284,6 +284,7 @@
JobClient jc = new JobClient(job);
boolean error = true;
RunningJob running = null;
+ String lastReport = null;
try {
running = jc.submitJob(job);
String jobId = running.getJobID();
@@ -293,12 +294,15 @@
Thread.sleep(1000);
} catch (InterruptedException e) {}
running = jc.getJob(jobId);
+ String report = null;
if (running.reduceProgress() == 0.0)
- LOG.info(" map "+Math.round(running.mapProgress()*100)
- +"% complete");
+ report=" map "+Math.round(running.mapProgress()*100)+"%";
else {
- LOG.info(" reduce "+Math.round(running.reduceProgress()*100)
- +"% complete");
+ report=" reduce "+Math.round(running.reduceProgress()*100)+"%";
+ }
+ if (!report.equals(lastReport)) {
+ LOG.info(report);
+ lastReport = report;
}
}
if (!running.isSuccessful()) {