Pig简介和安装

 

Pig和Hive对比

Apache Pig Hive
Apache Pig uses a language called Pig Latin. It was originally created atYahoo.Hive uses a language called HiveQL. It was originally created at Facebook.
Pig Latin is a data flow language.HiveQL is a query processing language.
Pig Latin is a procedural language and it fits in pipeline paradigm.HiveQL is a declarative language.
Apache Pig can handle structured, unstructured, and semi-structured data.Hive is mostly for structured data.

 

Pig执行模式

-----------------------------------

1. local  

所有文件都在本地,for test

2. mapreduce

数据在HDFS上

 

Pig运行模式

1. 交互模式(grunt shell)

输入-执行-输出

2. batch mode 批处理模式

编写pig为扩展名的pig脚本

3. enbed mode 嵌入式

编写udf,在脚本使用

 

 

 

 

安装PIG

1. download pig

wget https://mirrors.tuna.tsinghua.edu.cn/apache/pig/latest/pig-0.16.0.tar.gz

tar -zxvf pig-0.16.0.tar.gz

ln -s pig-0.16.0.tar.gz pig

 

2. config ~/.bashrc

vi ~/.bashrc

export PIG_HOME=/usr/local/pig

export PATH=:$PIG_HOME/bin

source ~/.bashrc

 

3. verify

pig -version 

 

 

参考:

http://pig.apache.org/docs/r0.16.0/

https://www.tutorialspoint.com/apache_pig/index.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qq_26182553

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值