7

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
cuneyt
  • 336
  • 5
  • 15

6 Answers6

2

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
seedhead
  • 3,655
  • 4
  • 32
  • 38
2

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

Sudhir N
  • 4,008
  • 1
  • 22
  • 32
  • Sudhir, I have added pig-0.10.1-withouthadoop.jar to under PIG_HOME but it does not solve the issue. I keep on getting the same error : "Cannot locate pig-withouthadoop.jar. do 'ant jar-withouthadoop', and try again" my .bashprofile looks like this : export HADOOP_HOME=/c/Hadoop export PIG_HOME=/c/PIG export PATH=$PATH:$HADOOP_HOME/bin export PATH=$PATH:$PIG_HOME/bin – java_enthu Aug 01 '13 at 08:27
  • I tried renaming "pig-0.10.1-withouthadoop.jar" to "pig-withouthadoop" then also I am facing the same issues. Any help on this will be highly appreciated. – java_enthu Aug 01 '13 at 08:45
1

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

java_enthu
  • 2,279
  • 7
  • 44
  • 74
0

Also, you can add path : (hadoop directory)\hadoop-v.v.v\bin to environment variables manually in Windows 7. This will solve this problem

which: no hadoop in (/usr/local/b.....)
Gurupad Hegde
  • 2,155
  • 15
  • 30
0

I had a similar problem with Pig 0.12.0 (and Hadoop 1.0.3) installed on Fedora 19. When trying any Pig command, e.g.

pig -help

I was getting the error:

Cannot locate pig-withouthadoop.jar. do 'ant jar-withouthadoop.jar', and try again

Hadoop and Pig installation /bin folders were properly included in my PATH.

Simply copying pig-0.12.0-withouthadoop.jar to PIG_HOME folder fixed the issue for me.

hanna
  • 627
  • 9
  • 15
0

You must visit this for installing pig 12 on hadoop 2.2.0 without any errors as it re compiles the pig library for hadoop version specified.

http://javatute.com/javatute/faces/post/hadoop/2014/installing-pig-11-for-hadoop-2-on-ubuntu-12-lts.xhtml

After following the steps, you will get the running pig without any errors on grunt.

Just enjoy doing.

% pig [return] 
Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66
Ashish
  • 51
  • 5