我是猪的新手,我正在使用存储在/ etc / passwd中的passwd文件。我已经在本地模式下启动了猪,代码为
A = LOAD 'passwd' using PigStorage(':');
B = foreach A generate $0 as id;
STORE B INTO 'output';
给我以下错误的作业未能产生结果。最后一行如果写入DUMP B;生成输出。这里是什么问题。? 提前致谢
Failed Jobs:
JobId Alias Feature Message Outputs
job_local_0004 A,B MAP_ONLY Message: Job failed! Error - NA file:///home/monish/Desktop/output.txt,
Input(s):
Failed to read data from "file:///home/monish/Desktop/passwd"
Output(s):
Failed to produce result in "file:///home/monish/Desktop/output.txt"
Job DAG:
job_local_0004
2013-02-07 11:13:40,578 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Failed!
答案 0 :(得分:0)
看起来你是从你的本地目录(file:/// home / monish / Desktop)调用pig,然后使用相对路径加载文件。
尝试并完全限定文件路径:
A = LOAD '/etc/passwd' using PigStorage(':');