Installing PIG on single node
Asked Answered
P

6

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
Propeller answered 13/7, 2012 at 11:46 Comment(0)
J
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
Joannejoannes answered 17/7, 2012 at 9:6 Comment(0)
L
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

Lolita answered 17/7, 2013 at 7:8 Comment(2)
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/binTeacart
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.Teacart
T
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

Teacart answered 14/8, 2013 at 9:19 Comment(0)
S
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.....)
Siegler answered 18/7, 2013 at 0:0 Comment(0)
P
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.

Pentstemon answered 18/1, 2014 at 14:2 Comment(0)
H
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] 
Haroun answered 31/1, 2014 at 6:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.