Launching Mahout from the Command Line (CLASSPATH)

Corresponds to Mahout successfully on Windows using Maven.

I am trying to run one of the examples from the command line and I do not understand what I am doing wrong. Looks like a CLASSPATH problem.

Let's say I want to run the GroupLensRecommenderEvaluatorRunner example. I go to the folder with the GroupLensRecommenderEvaluatorRunner.class file and execute:

java -cp C:/mahout/core/target/classes;. 

org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommenderEvaluatorRunner

This gives me a NoClassDefFoundError exception for the GroupLensRecommenderEvaluatorRunner class.

Is the path for -cp wrong?

btw, for those who are not familiar with mahout,

org.apache.mahout.cf.taste.example.grouplens

is a package of the class GroupLensRecommenderEvaluatorRunner. javadoc

Thanks guys.

ps - First I looked at the previous stack questions on CLASSPATH and followed these decisions before asking this question.

+3
3

$MAHOUT_HOME/examples/target/classes java CLASSPATH ( ), , , , .

, , mahout/hadoop.

http://www.cloudera.com/blog/2011/01/how-to-include-third-party-libraries-in-your-map-reduce-job/

script suoop (, --libJar) , , , (, seq2sparse).

$HADOOP_HOME/lib node. , , , , .

hasoop, cloudera , .

+1

, HADOOP_CLASSPATH mahout jar, .

export HADOOP_CLASSPATH =/home/xxx/my.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/mahout/mahout-core-0.7-cdh4. 3.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/mahout/mahout-core-0.7-cdh4.3.0-job.jar:/OPT/Cloudera//CDH-4.3.0-1.cdh4.3.0.p0.22/Library/Mahout/Mahout--0,7-cdh4.3.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/Library/Mahout/Mahout--0,7-cdh4.3.0-job.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib//--0,7-cdh4.3.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/mahout/mahout-math-0.7-cdh4.3.0.jar

hasoop com.mycompany.mahout.CSVtoVector iris/nb/iris1.csv iris/nb/data/iris.seq

, mahout HADOOP_CLASSPATH,

hadoop <classname>

0
source

Source: https://habr.com/ru/post/1761639/


All Articles