eclipse插件之pigpen安装与配置
2015-11-11 21:33
761 查看
原文地址:http://wiki.apache.org/pig/PigPen
PigPen
[align=left]PigPen is an eclipse plugin that helps users create pig-scripts, test them using the example generator and then submit them to a hadoop cluster as well.[/align]
Getting PigPen
The PigPen plugin jar can be obtained from
here.
[align=left]The jar can be placed in the eclipse/plugins/ folder. It is a good idea to start eclipse with a "-clean" option to ensure that the latest version of the plugins is being used.[/align]
Using PigPen
To start using PigPen you will have to set the path to the directory containing both hadoop-site.xml and pig.properties for the plugin to connect to the cluster. This can be done by going to Eclipse preferences -> Pig and adding a new variable
*ConfigurationPath* to theJobConf properties.
Diagram 1 : Setting the
ConfigurationPath
1. Create a new "General" Project in eclipse. 2. Add a new file to the project. Make sure the file has an extension ".pig". 3. This should start the Pig editor with the new empty file. PigPen has 3 editors. The *Operator Graph* shows you the
query in a graph form. The *Header* is to be used with the Operator Graph for registering jars or giving define directives. The *Pig Script* is the text editor. The figure below shows the PigPen editor.
Diagram 2 : PigPen editor
4. Currently the script can only be edited using the *Pig Script* text editor. The synchronization between the graph and the text editor happens when you save the script. So its a good idea to save the changes in the text editor before switching
views.
The following screenshots show the usage of the *Pig Script* editor.
Diagram 3 : Sample Script
Diagram 4 : Operator Graph
Running the Example Generator
[align=left]Once the script is error-free, you can run the example generator by clicking on the Pig icon in the toolbar. Once satisfied with the results, you can submit the script to the cluster by clicking on the Hadoop icon.[/align]
Diagram 5 : Pig and Hadoop icons are the 4th and 5th from left.
Diagram 6 : Output of the Example Generator
The following diagram shows the Pig Examples window
PigPen
[align=left]PigPen is an eclipse plugin that helps users create pig-scripts, test them using the example generator and then submit them to a hadoop cluster as well.[/align]
Getting PigPen
The PigPen plugin jar can be obtained from
here.
[align=left]The jar can be placed in the eclipse/plugins/ folder. It is a good idea to start eclipse with a "-clean" option to ensure that the latest version of the plugins is being used.[/align]
Using PigPen
To start using PigPen you will have to set the path to the directory containing both hadoop-site.xml and pig.properties for the plugin to connect to the cluster. This can be done by going to Eclipse preferences -> Pig and adding a new variable
*ConfigurationPath* to theJobConf properties.
Diagram 1 : Setting the
ConfigurationPath
1. Create a new "General" Project in eclipse. 2. Add a new file to the project. Make sure the file has an extension ".pig". 3. This should start the Pig editor with the new empty file. PigPen has 3 editors. The *Operator Graph* shows you the
query in a graph form. The *Header* is to be used with the Operator Graph for registering jars or giving define directives. The *Pig Script* is the text editor. The figure below shows the PigPen editor.
Diagram 2 : PigPen editor
4. Currently the script can only be edited using the *Pig Script* text editor. The synchronization between the graph and the text editor happens when you save the script. So its a good idea to save the changes in the text editor before switching
views.
The following screenshots show the usage of the *Pig Script* editor.
Diagram 3 : Sample Script
Diagram 4 : Operator Graph
Running the Example Generator
[align=left]Once the script is error-free, you can run the example generator by clicking on the Pig icon in the toolbar. Once satisfied with the results, you can submit the script to the cluster by clicking on the Hadoop icon.[/align]
Diagram 5 : Pig and Hadoop icons are the 4th and 5th from left.
Diagram 6 : Output of the Example Generator
The following diagram shows the Pig Examples window
相关文章推荐
- java分页
- Java基础学习26(异常处理一)
- 两个栈实现一个队列以及两个队列实现一个栈(Java)
- 自定义spring schema简化与canal集成
- MYeclipse和eclipse常用快捷键
- JAVA项目出现红色感叹号如何解决
- spring自定义标签
- Java打印三角形
- java学习--IO(2)
- 1.0.2 eclipse中Ctrl点击某个类提示Class File Editor Source not foun
- 1.0.1 javadoc生成文档时总是报错java.lang.IllegalArgumentException解决方法
- 1.0.0 JAVAC 不是内部或外部命令解决方法
- Java 集合
- RxJava 入门
- spring 官方下载地址(Spring Framework 3.2.x&Spring Framework 4.0.x
- eclipse快捷键
- 基础排序算法Java版本(上)
- java中用一个MyNumber类充当“生产者—消费者”模式的缓冲池实例
- 【Java】List的subList方法
- java学习-----IO