Apache Nutch is an extensible and scalable web crawler
NUTCH-1085 Nutch script does not require HADOOP_HOME
Julien Niochef55a8420cabf
diff --git a/CHANGES.txt b/CHANGES.txtindex e68577143..0cc4bc8bd 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogRelease 2.0 - Current Development+* NUTCH-1085 Nutch script does not require HADOOP_HOME (jnioche)+* NUTCH-1083 ParserChecker implements Tools (jnioche)* NUTCH-1004 Do not index empty values for title field (markus)diff --git a/src/bin/nutch b/src/bin/nutchindex d42939752..90c790dc4 100755--- a/src/bin/nutch+++ b/src/bin/nutch@@ -75,11 +75,6 @@ shiftTHIS_DIR=`dirname "$THIS"`NUTCH_HOME=`cd "$THIS_DIR/.." ; pwd`-# determine HADOOP_HOME-if [ "$HADOOP_HOME" = "" ]; then- HADOOP_HOME=$NUTCH_HOME-fi-# some Java parametersif [ "$NUTCH_JAVA_HOME" != "" ]; then#echo "run java in $NUTCH_JAVA_HOME"@@ -214,13 +209,13 @@ if $local; thenNUTCH_OPTS="-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl $NUTCH_OPTS"EXEC_CALL="$JAVA $JAVA_HEAP_MAX $NUTCH_OPTS -classpath $CLASSPATH"else- # check that we are really in a hadoop config- if [ ! -f ${HADOOP_HOME}/bin/hadoop ]; then- echo "Can't find Hadoop scripts. Set HADOOP_HOME to a valid home of Hadoop installation."+ # check that hadoop can be found on the path+ if [ $(which hadoop | wc -l ) -eq 0 ]; then+ echo "Can't find Hadoop executable. Add HADOOP_HOME/bin to the path or run in local mode."exit -1;fi# distributed mode- EXEC_CALL="$HADOOP_HOME/bin/hadoop jar $NUTCH_JOB"+ EXEC_CALL="hadoop jar $NUTCH_JOB"fi# run it