tree: bcb429485c280917c26679d34c2372c93cefe18d [path history] [tgz]
  1. src/
  2. blueprint.json
  3. clustertemplate.json
  4. pom.xml

Pig View


This View provides a UI to create, save and run pig scripts. You can browse the list of pig scripts you have created and saved. You can see the history of runs of the pig scripts, view the logs and download the results. You can also upload and use UDFs with your pig scripts.


  • Ambari 1.7.0 or later
  • HDFS with WebHDFS configured
  • WebHCat with Pig configured


The view can be built as a maven project.

mvn clean install

The build will produce the view archive.


Place the view archive on the Ambari Server and restart to deploy.

cp pig-0.1.0-SNAPSHOT.jar /var/lib/ambari-server/resources/views/
ambari-server restart

Cluster Configuration

Configure HDFS for a proxy user. In core-site.xml, add the following properties:


Configure WebHCat for a proxy user. In webhcat-site.xml, add the following properties:


Create Hadoop users and make members of the hdfs, hadoop and users groups. For example, to create a user “admin”:

useradd -G hdfs admin
usermod -a -G users admin
usermod -a -G hadoop admin

Check the “admin” user has the correct group membership.

id admin
uid=1002(admin) gid=1002(admin) groups=1002(admin),100(users),503(hadoop),498(hdfs)

Single Node Cluster

The following section describes how to use the Ambari Vagrant setup to create a single-node cluster with the Pig View.

Install Ambari Server and Ambari Agent.

Manually register Ambari Agent with Server.

Setup and Start Ambari Server.

Create Blueprint using the provided blueprint.json file.


Create Cluster using the provided clustertemplate.json file


After the cluster is created, deploy the Pig View into Ambari.

cp pig-0.1.0-SNAPSHOT.jar /var/lib/ambari-server/resources/views/
ambari-server restart

From the Ambari Administration interface, create a Pig view instance.

Details: Instance NamePIG_1
Details: Display NamePig
Details: DescriptionSave and execute Pig scripts
Properties: WebHDFS FileSystem URIwebhdfs://
Properties: WebHCat URL
Properties: Scripts HDFS Directory/tmp/${username}/scripts
Properties: Jobs HDFS Directory/tmp/${username}/jobs

Login to Ambari as “admin” and browse to the view instance.