在Hadoop上运行python程序错误集合

xiaoxiao2021-02-28  64

1.file参数,在Hadoop上执行时一定要加file 参数

hadoop jar /softs/hadoop/hadoop-2.6.0/share/hadoop/tools/lib/hadoop-streaming-2.6.0.jar  -D stream.non.zero.exit.is.failure=false  -mapper 1_map.py  -file 1_map.py  -reducer 1_reduce.py  -file 1_reduce.py   -input u.data   -output /output4     -jobconf mapred.reduce.tasks=3

2.要加-D参数,否则会报 PipeMapRed.waitOutputThreads(): subprocess failed with code 1错误

3.如果你是在windows下写的脚本,要

用vim打开该sh文件,输入: :set ff 回车,显示fileformat=dos,重新设置下文件格式: :set ff=unix 保存退出

否则会出现:没有那个文件或目录

   

转载请注明原文地址: https://www.6miu.com/read-54734.html

最新回复(0)