1. Download tar file from this link :
( Do check that pig version support installed Hadoop version)
e.g. My ubuntu has Hadoop 1.2.1 installed and have installed pig 0.12.1
Hadoop installed under : /usr/local/hadoop
hduser (hadoop group user) is under : /home/hduser
2. Open terminal and logged in as hduser
su hduser
3. Unpack the downloaded tar file using command
tar xzf pig-0.12.1.tar.gz
This will install pig under /home/hduser/
4. Edit bash file
gedit ~/.bashrc
Append following line
export PIG_HOME=/home/hduser/pig-0.12.1
export PATH=$PATH:$PIG_HOME/bin
export PIG_CLASSPATH=/usr/local/hadoop/conf
5. In terminal type
pig
This will open grunt (interactive shell for running pig commands) in Mapreduce mode.
(*Before starting pig make sure you have started Hadoop
/usr/local/hadoop$ bin/start-all.sh )
Learning goes on forever :)
No comments:
Post a Comment