1

我是 pig 新手,我正在使用存储在 /etc/passwd 中的 passwd 文件。我已经使用以下代码以本地模式启动 pig

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!
4

1 回答 1

0

看起来您正在从本地目录(file:///home/monish/Desktop)调用 pig,然后使用相对路径加载文件。

尝试完全限定文件路径:

A = LOAD '/etc/passwd' using PigStorage(':');
于 2013-02-07T12:01:48.637 回答