问题描述
作为hadoop的初学者,我开始尝试在Ubuntu中配置单节点hadoop集群。在安装和配置后,我使用hadoop处理了示例部分,它引发了以下错误:$ b $
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;)
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)
我已经使用了Java-7-oracle和Ubuntu 12.04,并且在这篇文章之后安装并配置了hadoop:
错误消息意味着虽然运行时能够找到类 ProgramDriver
,函数 run()
不存在。
最可能的原因是您运行的是旧版本的Hadoop,它暴露了 ProgramDriver
中的差异接口。大约一年前,这种方法被到 run( )
被称为 driver()
。
确定您正在运行最新版本的Hadoop。
Being a beginner to hadoop,I started to try out configuring a single node hadoop cluster in ubuntu. After installation and configuration, I worked with the example part with hadoop and it have thrown the following error
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
The error message means that while the runtime was able to find the class ProgramDriver
, the function run()
is not present.
The most likely reason for this is that you're running an old version of Hadoop that exposed a difference interface in ProgramDriver
. About a year ago this method was renamed to run()
after being called driver()
.
The fix for that would be making sure you're running a recent version of Hadoop.
这篇关于执行hadoop-mapreduce-examples-2.2.0.jar时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!