You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ab...@apache.org on 2010/07/19 13:18:42 UTC
svn commit: r965429 - /nutch/branches/nutchbase/src/bin/nutch
Author: ab
Date: Mon Jul 19 11:18:41 2010
New Revision: 965429
URL: http://svn.apache.org/viewvc?rev=965429&view=rev
Log:
Fix the issue with different version of Xerces - internal one
in JDK and external in lib/. Improve readability of conditionals.
Modified:
nutch/branches/nutchbase/src/bin/nutch
Modified: nutch/branches/nutchbase/src/bin/nutch
URL: http://svn.apache.org/viewvc/nutch/branches/nutchbase/src/bin/nutch?rev=965429&r1=965428&r2=965429&view=diff
==============================================================================
--- nutch/branches/nutchbase/src/bin/nutch (original)
+++ nutch/branches/nutchbase/src/bin/nutch Mon Jul 19 11:18:41 2010
@@ -75,7 +75,6 @@ if [ "$JAVA_HOME" = "" ]; then
exit 1
fi
-local=true
# NUTCH_JOB
if [ -f ${NUTCH_HOME}/nutch-*.job ]; then
@@ -83,6 +82,8 @@ if [ -f ${NUTCH_HOME}/nutch-*.job ]; the
for f in $NUTCH_HOME/nutch-*.job; do
NUTCH_JOB=$f;
done
+else
+ local=true
fi
# cygwin path translation
@@ -189,10 +190,10 @@ else
CLASS=$COMMAND
fi
-# distributed mode
-EXEC_CALL="$HADOOP_HOME/bin/hadoop jar $NUTCH_JOB"
if $local; then
+ # fix for the external Xerces lib issue with SAXParserFactory
+ NUTCH_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
@@ -200,6 +201,8 @@ else
echo "Can't find Hadoop scripts. Set HADOOP_HOME to a valid home of Hadoop installation."
exit -1;
fi
+ # distributed mode
+ EXEC_CALL="$HADOOP_HOME/bin/hadoop jar $NUTCH_JOB"
fi
# run it