terminal is not identifying pig command


2 Answer(s)


Check your .bashrc file that was created during Step 2 of the "PigInstallationForCDH3.pdf".

Step 2 has "export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24", however, that is for the old java.

Go to /usr/lib/jvm and find which java you have. The Hadoop CD4 has a java-1.5.0.

The interesting thing is that I do not have the "export JAVA_HOME.." in my .bashrc and my pig works fine. The JAVA_HOME is probably set in the VM instance already.

So I would remove the "export JAVA_HOME..."
from your .bashrc and save the file and restart the terminal as stated in Step 3.

Then try the pig command again. If it does not work, restart the VM instance and try again.

If it still does not work, post your bashrc and the contents of the /usr/lib/jvm directory and add the export JAVA_HOME with the path of the /usr/lib/java/.../bin to your .bashrc where "..." can be found for the java-1.5.0 directory. That directory is a softlink to "java-1.50-gcj-1.5.0.0" for my installation, so verify that for yours and put the appropriate value. Once again I do not think this will be needed however.

Hope this helps.

God Bless

hi Viresh,

For pig, make sure to export JAVA_HOME . Also note that we do not support CDH3 as its 3 yrs old. Please download CDH4 from cloudera (http://www.cloudera.com/content/cloudera/en/documentation/DemoVMs/Cloudera-QuickStart-VM/cloudera_quickstart_vm.html)

Thanks