Apache Pig,在沙箱中传递参数来运行Pig脚本

问题描述

我正在关注this,

但是我正在使用Hortonworks SandBox

我正在运行以下命令:

 [maria_dev@sandBox-hdp ~]$ pig -x local -f /home/maria_dev/s1.pig -p did=1

我收到此错误

Input(s):
Failed to read data from "/user/maria_dev/complex_2.txt"

Output(s):
Failed to produce result in "file:/tmp/temp71538092/tmp1285302214"

s1.pig的内容为:

a = LOAD 'hdfs://user/maria_dev/complex_2.txt'  USING PigStorage(' ') AS (T:tuple(driverId:int,week:int),M:[mileslogged:int]);
B = FILTER a BY T.driverId>$did;
DUMP B; 

我运行带有和不带有“ hdfs://”的s1.pig,但是错误是相同的。

/ user / maria_dev中的所有文件都具有777权限,grunt中的s1.pig可以正确执行。

和/ user / maria_dev文件夹的内容

enter image description here

以及运行dryrun的结果

 pig -x local -f /home/maria_dev/s1.pig -p did=1 -dryrun

看起来不错,如下图所示

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)