Apache Nutch is an extensible and scalable web crawler
NUTCH-1828 bin/crawl : incorrect handling of nutch errors
Julien Niochebe979bb974dd
diff --git a/CHANGES.txt b/CHANGES.txtindex 90c0616bc..a1df2bcbd 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogNutch Current Development+* NUTCH-1828 bin/crawl : incorrect handling of nutch errors (Mathieu Bouchard via jnioche)+* NUTCH-1775 IndexingFilter: document origin of passed CrawlDatum (snagel)* NUTCH-1693 TextMD5Signature computed on textual content (Tien Nguyen Manh, markus via snagel)diff --git a/src/bin/crawl b/src/bin/crawlindex e3f06d148..d2ae22eb2 100644--- a/src/bin/crawl+++ b/src/bin/crawl@@ -92,9 +92,10 @@ fi# initial injection"$bin/nutch" inject "$CRAWL_PATH"/crawldb "$SEEDDIR"+RETCODE=$?-if [ $? -ne 0 ]- then exit $?+if [ $RETCODE -ne 0 ]+ then exit $RETCODEfi@@ -111,9 +112,10 @@ doecho "Generating a new segment""$bin/nutch" generate $commonOptions "$CRAWL_PATH"/crawldb "$CRAWL_PATH"/segments -topN $sizeFetchlist -numFetchers $numSlaves -noFilter+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfi# capture the name of the segment@@ -131,9 +133,10 @@ do# fetching the segmentecho "Fetching : $SEGMENT""$bin/nutch" fetch $commonOptions -D fetcher.timelimit.mins=$timeLimitFetch "$CRAWL_PATH"/segments/$SEGMENT -noParsing -threads $numThreads+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfi# parsing the segment@@ -142,47 +145,53 @@ do# so that it does not fail the full taskskipRecordsOptions="-D mapred.skip.attempts.to.start.skipping=2 -D mapred.skip.map.max.skip.records=1""$bin/nutch" parse $commonOptions $skipRecordsOptions "$CRAWL_PATH"/segments/$SEGMENT+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfi# updatedb with this segmentecho "CrawlDB update""$bin/nutch" updatedb $commonOptions "$CRAWL_PATH"/crawldb "$CRAWL_PATH"/segments/$SEGMENT+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfi# note that the link inversion - indexing routine can be done within the main loop# on a per segment basisecho "Link inversion""$bin/nutch" invertlinks "$CRAWL_PATH"/linkdb "$CRAWL_PATH"/segments/$SEGMENT+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfiecho "Dedup on crawldb"$bin/nutch dedup $CRAWL_PATH/crawldb+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfiecho "Indexing $SEGMENT on SOLR index -> $SOLRURL""$bin/nutch" index -D solr.server.url=$SOLRURL "$CRAWL_PATH"/crawldb -linkdb "$CRAWL_PATH"/linkdb "$CRAWL_PATH"/segments/$SEGMENT+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfiecho "Cleanup on SOLR index -> $SOLRURL""$bin/nutch" clean -D solr.server.url=$SOLRURL "$CRAWL_PATH"/crawldb+ RETCODE=$?- if [ $? -ne 0 ]- then exit $?+ if [ $RETCODE -ne 0 ]+ then exit $RETCODEfidone