简体   繁体   中英

Hadoop jar WordCount.jar WordCount /input /output doesn't work

First we create input and output files manually with hdfs dfs -mkdir /input and hdfs dfs -mkdir /output . Then we execute hdfs dfs -copyFromLocal Books /Shakespare.txt /input/Shakespare.txt . After we run hadoop jar WordCount.jar WordCount /input /output this code we get the following error:

这个

Therefore we remove output and we run hadoop jar WordCount.jar WordCount /input /output again we get the following error:

这个

How can we get output?

Edit after Majid Hajibaba's answer:这个

WordCount.jar will create output directory itself. Just pass it as a parameter and don't make it handy. So please remove output directory and try again. However to run WordCount.jar you need to start yarn by start-yarn.sh and check ResourceManager is up and running by jps command.

It is good to know default ports on Hadoop ecosystem. See YARN Service Ports .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM