Validate the Installation
To validate your installation:
On the host machine where Pig is installed, run the following commands:
su $HDFS_USER/usr/hdp/current/hadoop-client/bin/ fs -copyFromLocal /etc/passwd passwd
Create a Pig script file named /tmp/id.pig that contains the following Pig Latin commands:
A = load 'passwd' using PigStorage(':');B = foreach A generate \$0 as id; store B into '/tmp/id.out';
Run the Pig script:
su $HDFS_USER pig -l /tmp/pig.log /tmp/id.pig