首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

基于stream的mr程序可能出现的错误(不断更新)

2012-10-18 
基于stream的mr程序可能出现的异常(不断更新)运行:Jar_path/home/ppstat/hadoop/contrib/streaming/hadoo

基于stream的mr程序可能出现的异常(不断更新)

运行:

Jar_path=/home/ppstat/hadoop/contrib/streaming/hadoop-streaming-0.20.203.0.jarout_put_path=/userstat/cc/checkcd /home/ppstat/hadoopbin/hadoop fs -test -e $out_put_pathif [ $? -eq 0 ];then    bin/hadoop fs -rmr $out_put_pathfibin/hadoop jar $Jar_path -Dmapred.reduce.tasks=40  -file /home/ppstat/cc/mr/CheckRepeatedRegMapper.py -mapper CheckRepeatedRegMapper.py -file /home/ppstat/cc/mr/CheckRepeatedRegReducer.py -reducer CheckRepeatedRegReducer.py -input /user/ppstat/userlog/logon/2012/09/* -output $out_put_path

?

全是粗心惹的祸,万一以后又不小心随手写错了,来这里看看,帮自己做个记录。

?

1、syntax error:unexpected end of file
文件是否从windows拷到linux?if fi是否结对出现?

?

2、PipeMapRed.waitOutputThreads(): subprocess failed with code 1
很有可能是程序出错,特别检查下是否有下标越界的情况。

python中 if后面 没有冒号(:)也会出现这样的情况

?

3、PipeMapRed.waitOutputThreads(): subprocess failed with code 2
mapper 和 reducer是否都只写了脚本名。此外尝试在程序最上面加上 #!/usr/bin/env python

?

4、出现打开jar错误之类的
请确认变量名是否有缺失 譬如从windows拷到linux 第一行的aaa=bbb很可能就缺失成a=bbb,那下面的$aaa自然也访问不到了

热点排行