如何使用hadoop安装执行mahout
我正在尝试弄清楚如何使用 hadoop 运行 mahout jar 示例。我配置了 mahout 和 hadoop,现在我进入 hadoop 目录并输入如下内容:
/Users/hadoop/hadoop-0.20.2/bin/hadoop jar /Users/hadoop/trunk/examples/mahout-examples- 0.5-SNAPSHOT-job.jar org.apache.mahout.SpareVectorsFromSequenceFile -w -i ratings -o ratings_vectors
但我正在尝试,我的目标是为 Grouplens 数据集运行 hadoop 作业。我执行了 put 命令将我的 ratings.dat 上传到 Hadoop,然后呢?该命令总是给我这样的信息:
Exception in thread "main" java.lang.ClassNotFoundException: org.apache.mahout.SpareVectorsFromSequenceFile
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
我的问题是:
- 如何在 hadoop 目录中设置正确的路径来调用 mahout?
- 我如何使用 org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommenderEvaluatorRunner 通过 hadoop 计算我的数据 ratings.dat?
非常感谢,我从 hadoop 和 mahout 开始;)
i'm trying to figure out how to run mahout jar examples with hadoop. I configured mahout and hadoop, now i enter in the hadoop dir and type something like this:
/Users/hadoop/hadoop-0.20.2/bin/hadoop jar /Users/hadoop/trunk/examples/mahout-examples-0.5-SNAPSHOT-job.jar org.apache.mahout.SpareVectorsFromSequenceFile -w -i ratings -o ratings_vectors
but i'm trying and my goal is to run hadoop job for the Grouplens dataset. I executed put command to upload my ratings.dat to Hadoop, and then? The command give me always something like this:
Exception in thread "main" java.lang.ClassNotFoundException: org.apache.mahout.SpareVectorsFromSequenceFile
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
My questions are:
- how can i set the right path in hadoop dir to call mahout?
- how can i use the
org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommenderEvaluatorRunner
to compute my data ratings.dat with hadoop?
Thank you very much, I'm beginning with hadoop and mahout ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有一个错字。它们是“稀疏向量”,而不是“备用向量”。请参阅
SpareVectorsFromSequenceFile
,它应该是SparseVectorsFromSequenceFile
。You have a typo. They are "sparse vectors", not "spare vectors". See
SpareVectorsFromSequenceFile
which should beSparseVectorsFromSequenceFile
.