mahout不会启动.与hadoop和mahout之间的兼容版本有关吗? [英] mahout wont start up. Anything to do with compatible version between hadoop and mahout?

查看:162
本文介绍了mahout不会启动.与hadoop和mahout之间的兼容版本有关吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的hadoop,而不是说mahout.我希望有人可以帮助我通过这里..已经尝试了2天..
我已经在运行hadoop集群了.
我正在使用hadoop-2.0.0-alpha.
我安装了mahout(ahout-distribution-0.7)和maven-2.2.1(最新的maven-3.0.4无法正常工作)

I am new to hadoop and not to say mahout. I hope someone could assist me to get through here.. have been trying for 2 days..
I have already a hadoop cluster running.
I am using hadoop-2.0.0-alpha.
I installed mahout (ahout-distribution-0.7) and maven-2.2.1 (latest maven-3.0.4 doesnt work)

现在,我想运行mahout来了解它是什么.
我了解到,通过键入"mahout"将打印出mahout中可用的选项(算法)列表,但是当我键入mahout时,它只会给我Java异常.

Now i would like to just run mahout to get the idea of what is it.
I learnt that by typing "mahout" it will print out a list of options (algorithms) available in mahout, but when i typed mahout, it just gives me Java Exception.

$ [hadoop@localhost bin]$ mahout
MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
Running on hadoop, using /home/hadoop/hadoop/bin/hadoop and HADOOP_CONF_DIR=/home/hadoop/hadoop/conf
MAHOUT-JOB: /home/hadoop/mahout/examples/target/mahout-examples-0.7-job.jar
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.driver([Ljava/lang/String;)V
    at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:208)

从我在线搜索的内容来看,大多数答案都要求我使用较低版本的hadoop,即hadoop-0.20,我的问题现在与我的hadoop版本有关吗?
谢谢.

From what i googled online, most of the answers required me to use lower version of hadoop, ie hadoop-0.20, Is my problem now has something to do with my hadoop version?
Thank you.

========新编辑=======

我将hadoop版本更改为hadoop-1.0.3,现在当我键入"mahout"(我的mahout是version7)时它可以工作

I changed my hadoop version to hadoop-1.0.3 and now it works when i typed "mahout" (my mahout is version7)

但是当我尝试运行示例时,它再次失败,并显示类似的错误.

But it fails again with the similar error, when i tried to run an example..

$ hadoop /home/hadoop/mahout/core/target/mahout-core-0.7-job.jar org.apache.mahout.cf.taste.hadoop.item.RecommenderJob -Dmapred.output.dir=output  -Dmapred.input.dir=input/prefs.txt  --usersFile input/users.txt --similarityClassname SIMILARITY_PEARSON_CORRELATION
Caused by: java.lang.ClassNotFoundException: .home.hadoop.mahout.core.target.mahout-core-0.7-job.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: /home/hadoop/mahout/core/target/mahout-core-0.7-job.jar. Program will exit.

嗯..

推荐答案

是的,如果您希望这样做,则需要使用其他版本的Hadoop(或从源代码构建最新的Mahout).您遇到了 NoSuchMethodError ,所以首先要做的是检查 ProgramDriver 是否在您使用的hadoop分发版中.

Yes it looks like you need to use a different version of Hadoop (or build the latest Mahout from source) if you want this to work. You got a NoSuchMethodError so the first thing to do is check if the ProgramDriver is in the distribution of hadoop you're using.

查看各种版本的API文档,您会发现它在v0.0.20.x中已被从较新版本中删除.

Looking at the API docs for the various version you can see that its in v0.0.20.x but had been removed from the newer versions.

  • http://hadoop.apache.org/common/docs/r0.20.205.0/api/index.html
  • http://hadoop.apache.org/common/docs/r2.0.0-alpha/api/index.html (your version)

查看JIRA for Mahout,您可以看到7月11日提交了一个与此问题类似的错误,并已在0.8版中进行了修复.

Looking at the JIRA for Mahout you can see a bug was submitted for a similar problem to this on July 11th and has been fixed in version 0.8.

更新:

hadoop命令之后,您的命令应该没有 jar 吗?像这样:

Shouldn't your command have jar after the hadoop command? Something like:

$ hadoop jar/home/hadoop/mahout/core/target/mahout-core-0.7-job.jar 等等

$ hadoop jar /home/hadoop/mahout/core/target/mahout-core-0.7-job.jar etc

这篇关于mahout不会启动.与hadoop和mahout之间的兼容版本有关吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆