[英]I am unable to execute a mapreduce job in a Hadoop cluster
$ hadoop jar /usr/lib/hadoop/hadoop-streaming-2.6.0-cdh5.13.0.jar -file mapper.py -mapper mapper.py -file reducer.py -reducer reducer.py -input /user/cloudera/test.txt -output /user/cloudera/result
I am using this command to execute MapReduce program using Mapper as mapper.py
and Reducer as reducer.py
我正在使用此命令执行 MapReduce 程序,使用 Mapper 作为mapper.py
和 Reducer 作为reducer.py
It throws an an error Not a valid JAR:/usr/lib/hadoop/hadoop-streaming-2.6.0-cdh5.13.0.jar
它抛出一个错误Not a valid JAR:/usr/lib/hadoop/hadoop-streaming-2.6.0-cdh5.13.0.jar
I am using MobaXterm and VMBox & My home directory is /user/cloudera
, mapper program location /user/cloudera/mapper.py
reducer location /user/cloudera/reducer.py
我正在使用 MobaXterm 和 VMBox & 我的主目录是/user/cloudera
,映射程序位置/user/cloudera/mapper.py
减速机位置/user/cloudera/reducer.py
If you are using cloudera
distribution for practice, the JAR
will not be available in the mentioned location /usr/lib/hadoop
.如果您使用cloudera
发行版进行练习,则JAR
将在上述位置/usr/lib/hadoop
中不可用。 The hadoop-streaming JAR will be present in /usr/lib/hadoop-mapreduce/
hadoop-streaming JAR 将出现在/usr/lib/hadoop-mapreduce/
Run with the updated location of the JAR
, it should work fine.使用JAR
的更新位置运行,它应该可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.