运行hadoop wordcount示例时的错误消息

wgxvkvu9  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(392)

我使用这个命令在hadoop中运行wordcound示例。

hadoop jar /usr/local/Cellar/hadoop/3.0.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.5.jar wordcount inputWiki/Wiki_data_100MB outputWiki0301

我得到了如下的错误信息。

2018-03-01 18:54:14,845 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2018-03-01 18:54:16,107 INFO beanutils.FluentPropertyBeanIntrospector: Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.*

我以前用过这个命令运行过类似的文件,效果很好。有人能帮我吗?
更新以下结果:
pal-nat186-66-224:bin xujingjing$hadoop jar/usr/local/cerll/hadoop/3.0.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.5.jar wordcount inputgurtenberg0302/gurtenberg.txt outputgurtenberg0302 2018-03-02 17:23:58961 warn util.nativecodeloader:无法为您的平台加载本机hadoop库。。。在适用的情况下使用内置java类2018-03-02 17:24:00164 info beanutils.fluentpropertybeanintrospector:为public final void org.apache.commons.configuration2.abstractconfiguration.setproperty(java.lang.string,java.lang.object)创建propertydescriptor时出错!忽略此属性。2018-03-02 17:24:00226 info impl.metricsconfig:已从hadoop-metrics2.properties加载属性2018-03-02 17:24:00396 info impl.metricsystemimpl:计划的度量快照周期为10秒。2018-03-02 17:24:00397 info impl.metricsystemimpl:jobtracker metrics system启动2018-03-02 17:24:00,781 info mapreduce.jobsubmitter:清理临时区域文件:/tmp/hadoop/mapred/staging/xujingjing1314852612/.staging/job\u local1314852612\u 0001 org.apache.hadoop.mapreduce.lib.input.invalidinputexception:输入路径不存在:hdfs://localhost:8020/user/xujingjing/inputgurtenberg0302/gurtenberg.txt网址org.apache.hadoop.mapreduce.lib.input.fileinputformat.singlethreadedliststatus(fileinputformat)。java:330)位于org.apache.hadoop.mapreduce.lib.input.fileinputformat.liststatus(fileinputformat)。java:272)位于org.apache.hadoop.mapreduce.lib.input.fileinputformat.getsplits(fileinputformat)。java:394)在org.apache.hadoop.mapreduce.jobsubmitter.writenewsplits(jobsubmitter。java:313)在org.apache.hadoop.mapreduce.jobsubmitter.writesplits(jobsubmitter。java:330)在org.apache.hadoop.mapreduce.jobsubmitter.submitjobinternal(jobsubmitter。java:203)在org.apache.hadoop.mapreduce.job$11.run(job。java:1570)在org.apache.hadoop.mapreduce.job$11.run(作业。java:1567)位于java.base/javax.security.auth.subject.doas(subject)的java.base/java.security.accesscontroller.doprivileged(本机方法)。java:423)在org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation。java:1962)在org.apache.hadoop.mapreduce.job.submit(作业。java:1567)在org.apache.hadoop.mapreduce.job.waitforcompletion(作业。java:1588)在org.apache.hadoop.examples.wordcount.main(wordcount。java:87)位于java.base/jdk.internal.reflect.nativemethodaccessorimpl.invoke0(本机方法),位于java.base/jdk.internal.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:62)在java.base/jdk.internal.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.base/java.lang.reflect.method.invoke(method。java:564)在org.apache.hadoop.util.programdriver$programdescription.invoke(programdriver。java:71)在org.apache.hadoop.util.programdriver.run(programdriver。java:144)在org.apache.hadoop.examples.exampledriver.main(exampledriver。java:74)位于java.base/jdk.internal.reflect.nativemethodaccessorimpl.invoke0(本机方法),位于java.base/jdk.internal.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:62)在java.base/jdk.internal.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.base/java.lang.reflect.method.invoke(method。java:564)在org.apache.hadoop.util.runjar.run(runjar。java:239)在org.apache.hadoop.util.runjar.main(runjar。java:153)pal-nat186-66-224:宾旭晶晶$

quhf5bfb

quhf5bfb1#

错误是这样的
输入路径不存在:hdfs://localhost:8020/user/xujingjing/inputgurtenberg0302/gurtenberg.txt
所以使用

hdfs dfs -mkdir -p /user/xujingjing/inputGurtenberg0302/
hdfs dfs -copyFromLocal \
   /path/to/gurtenberg.txt \
   /user/xujingjing/inputGurtenberg0302/

我以前用这个命令运行过类似的文件
初始命令中的行使用完全不同的文件

相关问题