[英]Error while executing hadoop-mapreduce-examples-2.2.0.jar
Being a beginner to hadoop,I started to try out configuring a single node hadoop cluster in ubuntu. 作为hadoop的初学者,我开始尝试在ubuntu中配置单节点hadoop集群。 After installation and configuration, I worked with the example part with hadoop and it have thrown the following error
安装和配置后,我使用hadoop处理了示例部件,并抛出了以下错误
hduser1@ubuntu:/usr/local/hadoop$ hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce- examples-2.2.0.jar pi 2 5
java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.run([Ljava/lang/String;)I
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
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:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
I have used Java-7-oracle and Ubuntu 12.04 and followed this post to install and configure hadoop: http://codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html 我已经使用Java-7-oracle和Ubuntu 12.04,并按照此帖子安装和配置hadoop: http : //codesfusion.blogspot.in/2013/10/setup-hadoop-2x-220-on-ubuntu.html
The error message means that while the runtime was able to find the class ProgramDriver
, the function run()
is not present. 该错误消息表示,尽管运行时能够找到类
ProgramDriver
,但函数run()
不存在。
The most likely reason for this is that you're running an old version of Hadoop that exposed a difference interface in ProgramDriver
. 造成这种情况的最可能原因是您运行的是Hadoop的旧版本,该版本公开了
ProgramDriver
的不同接口。 About a year ago this method was renamed to run()
after being called driver()
. 大约一年前,此方法在被称为
driver()
之后重命名为run()
driver()
。
The fix for that would be making sure you're running a recent version of Hadoop. 解决该问题的方法是确保您正在运行最新版本的Hadoop。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.