Author: jnioche Date: Thu Apr 17 10:03:15 2014 New Revision: 1588198 URL: http://svn.apache.org/r1588198 Log: NUTCH-1761 Crawl script fails to find job file if not started from inside bin dir (David Hosking, jnioche)
Modified: nutch/branches/2.x/CHANGES.txt nutch/branches/2.x/src/bin/crawl Modified: nutch/branches/2.x/CHANGES.txt URL: http://svn.apache.org/viewvc/nutch/branches/2.x/CHANGES.txt?rev=1588198&r1=1588197&r2=1588198&view=diff ============================================================================== --- nutch/branches/2.x/CHANGES.txt (original) +++ nutch/branches/2.x/CHANGES.txt Thu Apr 17 10:03:15 2014 @@ -2,6 +2,8 @@ Nutch Change Log Current Development +* NUTCH-1761 Crawl script fails to find job file if not started from inside bin dir (David Hosking, jnioche) + * NUTCH-1603 ZIP parser complains about truncated PDF file (snagel via lewismc) * NUTCH-1743 parsechecker to show outlinks (snagel) Modified: nutch/branches/2.x/src/bin/crawl URL: http://svn.apache.org/viewvc/nutch/branches/2.x/src/bin/crawl?rev=1588198&r1=1588197&r2=1588198&view=diff ============================================================================== --- nutch/branches/2.x/src/bin/crawl (original) +++ nutch/branches/2.x/src/bin/crawl Thu Apr 17 10:03:15 2014 @@ -70,16 +70,15 @@ timeLimitFetch=180 addDays=0 ############################################# -# determines whether mode based on presence of job file +bin=`dirname "$0"` +bin=`cd "$bin"; pwd` +# determines whether mode based on presence of job file mode=local -if [ -f ../*nutch-*.job ]; then +if [ -f ${bin}/../*nutch*.job ]; then mode=distributed fi -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - # note that some of the options listed here could be set in the # corresponding hadoop site xml param file commonOptions="-D mapred.reduce.tasks=$numTasks -D mapred.child.java.opts=-Xmx1000m -D mapred.reduce.tasks.speculative.execution=false -D mapred.map.tasks.speculative.execution=false -D mapred.compress.map.output=true"