CentOS7安装Pig(Hadoop2.6,Pig0.15)

本文档详细介绍了如何在Hadoop集群中安装和配置Pig的过程。从下载Pig到解压并设置环境变量,再到启动Pig Shell,每一步都有具体的指导。此外,还记录了启动过程中的一些信息提示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.首先你需要Hadoop集群,看这里:

http://blog.youkuaiyun.com/a237428367/article/details/50462858

2.tar -zxvf pig-0.15.0.tar.gz 你懂的

3. vi /etc/profile 环境变量

   如果是本地模式则只需

export PIG_HOME=/hadoop/pig-0.15.0

   MapReduce模式则再加上

export PIG_CLASSPATH=${HAOOP_HOME}/conf/

4. ./pig 进入grunt shell

16/01/06 16:41:23 INFO pig.ExecTypeProvider: Trying ExecType : LOCAL
16/01/06 16:41:23 INFO pig.ExecTypeProvider: Trying ExecType : MAPREDUCE
16/01/06 16:41:23 INFO pig.ExecTypeProvider: Picked MAPREDUCE as the ExecType
2016-01-06 16:41:23,285 [main] INFO  org.apache.pig.Main - Apache Pig version 0.15.0 (r1682971) compiled Jun 01 2015, 11:44:35
2016-01-06 16:41:23,285 [main] INFO  org.apache.pig.Main - Logging error messages to: /hadoop/pig-0.15.0/bin/pig_1452069683283.log
2016-01-06 16:41:23,319 [main] INFO  org.apache.pig.impl.util.Utils - Default bootup file /root/.pigbootup not found
2016-01-06 16:41:23,712 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2016-01-06 16:41:23,712 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2016-01-06 16:41:23,712 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://master:9000
2016-01-06 16:41:24,292 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2016-01-06 16:41:24,292 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: http://master:9001
2016-01-06 16:41:24,293 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
grunt>

5. quit; 退出shell(记得带分号)

完毕.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值