A. Pre-Requisite:
Hadoop
B. Pig Installation steps:
1. Download Hive from http://mirror.symnds.com/ software/Apache/pig/stable/ pig-0.11.1.tar.gz
2. Extract Pig : tar -xzf pig-0.11.1.tar.gz (it will extract to a folder hive-0.10.0-bin)
3. sudo mv pig-0.11.1/ pig
4. sudo mv pig/ /usr/hadoop/.
5. cd /usr/hadoop
6. sudo chown -R hduser:hadoop pig/
7. Set below Env variables (under hduser).
export PIG_HOME=/usr/hadoop/pig
export PATH=$PIG_HOME/bin:$PATH
(Make sure hadoop is started. To start Hadoop, ssh localhost; start-all.sh)
At command prompt in terminal: pig (type pig & enter). It will lead you to grunt> prompt, where you can run pig statements / scripts
Note: hduser is the user under which I have installed hadoop & hive. In your case it may be different
********** End of Pig Installation - Enjoy statement based HDFS tool ***************************
No comments:
Post a Comment