Pig Installation

Hadoop is already installed, and the environment variables are set (see Hadoop installation https://github.com/mirjalil/DataScience/blob/master/bigdata-platforms/install-hadoop-ubuntu.md)

  • Download Pig from http://pig.apache.org/releases.html

  • Extract and move to /usr/local/pig/

  • export PATH=/usr/local/pig/bin/:$PATH

  • Disable the logging info create a file called ~/nolog.conf and add the following content

log4j.rootLogger=fatal
  • Run and test Pig
    • on local mode and test accessing local filesystem
pig -x local
ls
  • on MapReduce mode and test accessing HDFS
pig -x mapreduce
fs -lsr /
  • quit Pig console: quit

In [ ]: