Use the following steps to validate your installation:
On the host machine where Pig is installed execute the following commands:
su $HDFS_USER /usr/lib/hadoop/bin/hadoop fs -copyFromLocal /etc/passwd passwd
Create the pig script file
/tmp/id.pig
with the following contents:A = load 'passwd' using PigStorage(':'); B = foreach A generate \$0 as id; store B into '/tmp/id.out';
Execute the Pig script:
su $HDFS_USER pig -l /tmp/pig.log /tmp/id.pig