gpt4 book ai didi

hadoop - 无法在 Mahout.0.13 中添加类 : org. apache.mahout.classifier.df.mapreduce.BuildForest

转载 作者:可可西里 更新时间:2023-11-01 15:54:53 26 4
gpt4 key购买 nike

1)当我运行这个随机森林例子时

$MAHOUT_HOME/bin/mahout org.apache.mahout.classifier.df.mapreduce.BuildForest -Dmapred.max.split.size=1874231 -d inputMahoutExamples/RandomForest/rfsplit/trainingSet/* -ds inputMahoutExamples/RandomForest/glass.info -sl 5 -p -t 10 -o inputMahoutExamples/RandomForest/rfmodel

我遇到了这个错误

MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
Running on hadoop, using /usr/local/hadoop-2.7.2/bin/hadoop and HADOOP_CONF_DIR=/usr/local/hadoop-2.7.2/etc/hadoop
MAHOUT-JOB: /usr/local/mahout/examples/target/mahout-examples-0.13.0-job.jar
17/08/02 16:55:29 WARN MahoutDriver: Unable to add class: org.apache.mahout.classifier.df.mapreduce.BuildForest
java.lang.ClassNotFoundException: org.apache.mahout.classifier.df.mapreduce.BuildForest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:237)
at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6

2)我正在使用 Mahout-0.13 和 hadoop -2.7.2

最佳答案

 $HADOOP_HOME/bin/hadoop jar $MAHOUT_HOME/examples/target/mahout-examples-0.13.0-job.jar org.apache.mahout.classifier.df.mapreduce.BuildForest -d inputMahoutExamples/RandomForest/rfsplit/trainingSet/* -ds inputMahoutExamples/RandomForest/glass.info -sl 5 -p -t 100 -o inputMahoutExamples/RandomForest/rfmodel

同样的错误

Exception in thread "main" java.lang.ClassNotFoundException: org.apache.mahout.classifier.df.mapreduce.BuildForest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.hadoop.util.RunJar.run(RunJar.java:214)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

我认为这个问题只存在于 Mahout-0.13 中。你怎么看?

关于hadoop - 无法在 Mahout.0.13 中添加类 : org. apache.mahout.classifier.df.mapreduce.BuildForest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45471119/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com