[
https://issues.apache.org/jira/browse/NUTCH-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888255#action_12888255
]
Andrzej Bialecki commented on NUTCH-848:
-----------------------------------------
Thinking about it more, I don't like the current patch... it means maintaining
two nearly identical scripts, which is clunky and prone to errors.
I propose a different way to solve this: since we already know in the script
whether it's run as a distributed or local, why not use the same uber-script in
both cases, just use a different "execute" command:
* in case of a local runtime use {{EXECUTE="$JAVA $CLASSPATH"}}, then you call
{{"$EXECUTE <args>"}}
* in case of a distributed runtime use {{EXECUTE="$HADOOP_HOME/bin/hadoop
$NUTCH_HOME/$NUTCH_JOB"}}. BTW, we need to discover the right value of
HADOOP_HOME - if it's not already set then use NUTCH_HOME, otherwise use that
value (nutch could be run from a different path than the hadoop installation)
> Error when calling 'nutch solrindex' in deployed configuration
> --------------------------------------------------------------
>
> Key: NUTCH-848
> URL: https://issues.apache.org/jira/browse/NUTCH-848
> Project: Nutch
> Issue Type: Bug
> Reporter: Julien Nioche
> Priority: Blocker
> Fix For: 2.0
>
> Attachments: NUTCH-848.patch, NUTCH-848_1.patch, nutch-deploy
>
>
> See https://issues.apache.org/jira/browse/NUTCH-843
> In a deployed environment with just bin/nutch and the job file on an
> independent Hadoop configuration, a call to 'nutch solrindex' yields :
> {code}
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/solr/client/solrj/SolrServer
> Caused by: java.lang.ClassNotFoundException:
> org.apache.solr.client.solrj.SolrServer
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> Could not find the main class: org.apache.nutch.indexer.solr.SolrIndexer.
> Program will exit.
> {code}
> Surprisingly some tasks work fine, but not this one.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.