Saturday 14 January 2017

Pig Installation on ubuntu 16.04

Need to switch into hduser that is dedicated to hadoop installation

Download Pig into Downloads folder from:
http://redrockdigimark.com/apachemirror/pig/pig-0.16.0/


hduser@mayank-Compaq-510:/home/mayank$ sudo mkdir /usr/lib/pig
hduser@mayank-Compaq-510:/home/mayank$ sudo cp Downloads/pig-0.16.0.tar.gz  /usr/lib/pig/
hduser@mayank-Compaq-510:/home/mayank$ cd /usr/lib/pig/
hduser@mayank-Compaq-510:/home/mayank$ tar -xvf pig-0.16.0.tar.gz
hduser@mayank-Compaq-510:/home/mayank$ gedit ~/.bashrc




Add following in editor:




### Pig Home directory

export PIG_HOME="/usr/lib/pig/pig-0.16.0"
export PIG_CONF_DIR="$PIG_HOME/conf"
export PIG_CLASSPATH="$PIG_CONF_DIR"

export PATH="$PIG_HOME/bin:$PATH"

hduser@mayank-Compaq-510:/home/mayank$ pig -h
 "This command use to check pig availability"


hduser@mayank-Compaq-510:/home/mayank$ pig
17/01/14 21:23:55 INFO pig.ExecTypeProvider: Trying ExecType : LOCAL
17/01/14 21:23:55 INFO pig.ExecTypeProvider: Trying ExecType : MAPREDUCE
17/01/14 21:23:55 INFO pig.ExecTypeProvider: Picked MAPREDUCE as the ExecType
17/01/14 21:23:55 WARN pig.Main: Cannot write to log file: /home/mayank/pig_1484409235225.log
2017-01-14 21:23:55,228 [main] INFO  org.apache.pig.Main - Apache Pig version 0.16.0 (r1746530) compiled Jun 01 2016, 23:10:49
2017-01-14 21:23:55,270 [main] INFO  org.apache.pig.impl.util.Utils - Default bootup file /home/hduser/.pigbootup not found
2017-01-14 21:23:56,350 [main] WARN  org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2017-01-14 21:23:56,356 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2017-01-14 21:23:56,356 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2017-01-14 21:23:56,356 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://localhost:54310
2017-01-14 21:23:57,215 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: localhost:54311
2017-01-14 21:23:57,249 [main] INFO  org.apache.pig.PigServer - Pig Script ID for the session: PIG-default-e439e9ab-2054-46e3-9bff-daa870b7450a
2017-01-14 21:23:57,249 [main] WARN  org.apache.pig.PigServer - ATS is disabled since yarn.timeline-service.enabled set to false
grunt>







No comments:

Post a Comment