Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing PIG on single node

I installed Hadoop (1.0.2) for a single node on Windows 7 with Cygwin, and it is working. However, I cannot get PIG (0.10.0) to see the Hadoop.

1) "Error: JAVA_HOME is not set."

I added this line to pig (under bin): export JAVA_HOME=/cygdrive/c/PROGRA~1/Java/jdk1.7.0_05

2) which: no hadoop in (/usr/local/b.....)
cygpath: cannot create short name of C:\pig-0.10.0\logs
Cannot locate pig.jar. do 'ant jar', and try again

I tried adding below lines to pig and it is still not finding hadoop. What should i do?

export PIG_HOME="/cygdrive/c/pig-0.10.0"
export PATH=$PATH:$PIG_HOME/bin
export PIG_CLASSPATH=/cygdrive/hadoop/hadoop-1.0.2/conf
like image 200
cuneyt Avatar asked Jul 13 '12 11:07

cuneyt


3 Answers

You might need to add your Hadoop install to your path as well. e.g.

export HADOOP_INSTALL=/Users/yourname/dev/hadoop-0.20.203.0 
export PATH=$PATH:$HADOOP_INSTALL/bin
like image 99
seedhead Avatar answered Oct 01 '22 16:10

seedhead


I had same issue with pig-0.11. Seems this is cygwin specific issue.

Copying pig-0.11.1-withouthadoop to pig-withouthadoop.jar under PIG_HOME fixed the issue for me

like image 38
Sudhir N Avatar answered Oct 01 '22 14:10

Sudhir N


I was trying to set up PIG on my gateway machine which has Windows 7 installed on it.

This issue is very specific to Cygwin.

After breaking my head for a couple of hours I found the solution :

Solution is very simple.

Just rename the jar file under ”pig-0.10.1-withouthadoop.jar” to “pig-withouthadoop.jar”.

Its documented here

like image 44
java_enthu Avatar answered Oct 01 '22 15:10

java_enthu