You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by jn...@apache.org on 2010/07/30 13:44:48 UTC
svn commit: r980742 -
/nutch/branches/nutchbase/src/java/org/apache/nutch/crawl/DbUpdaterJob.java
Author: jnioche
Date: Fri Jul 30 11:44:47 2010
New Revision: 980742
URL: http://svn.apache.org/viewvc?rev=980742&view=rev
Log:
DbUpdaterJob returns success status
Modified:
nutch/branches/nutchbase/src/java/org/apache/nutch/crawl/DbUpdaterJob.java
Modified: nutch/branches/nutchbase/src/java/org/apache/nutch/crawl/DbUpdaterJob.java
URL: http://svn.apache.org/viewvc/nutch/branches/nutchbase/src/java/org/apache/nutch/crawl/DbUpdaterJob.java?rev=980742&r1=980741&r2=980742&view=diff
==============================================================================
--- nutch/branches/nutchbase/src/java/org/apache/nutch/crawl/DbUpdaterJob.java (original)
+++ nutch/branches/nutchbase/src/java/org/apache/nutch/crawl/DbUpdaterJob.java Fri Jul 30 11:44:47 2010
@@ -42,7 +42,7 @@ implements Tool {
FIELDS.add(WebPage.Field.PREV_SIGNATURE);
}
- private void updateTable() throws Exception {
+ private int updateTable() throws Exception {
LOG.info("DbUpdaterJob: starting");
Job job = new NutchJob(getConf(), "update-table");
//job.setBoolean(ALL, updateAll);
@@ -56,13 +56,17 @@ implements Tool {
NutchWritable.class, DbUpdateMapper.class);
StorageUtils.initReducerJob(job, DbUpdateReducer.class);
- job.waitForCompletion(true);
+ boolean success = job.waitForCompletion(true);
+ if (!success){
+ LOG.info("DbUpdaterJob: failed");
+ return -1;
+ }
LOG.info("DbUpdaterJob: done");
+ return 0;
}
public int run(String[] args) throws Exception {
- updateTable();
- return 0;
+ return updateTable();
}
public static void main(String[] args) throws Exception {