Home

Awesome

#Oink

The aim of this project is to provide a REST based interface for PIG execution. Oink is Pig on Servlet which provides the following functionalities:

For more information on the targetted use-case and REST documentation please refer to our wiki.

Usage

Requisites

Build

The following steps need to be followed in order to build the war file of the REST service:

Running test cases

Deployment

Default Configuration

Default configuration is to use localhost as the Hadoop cluster. Following are configuration parameters available (under service/src/main/resources/default.properties file) which can be changed :

jobtracker=localhost:8021 (Job tracker address)
jobtracker.ui=http://localhost:50030/jobdetails.jsp?jobid= (Job tracker UI URL used for providing stats information)
fs.default.name=hdfs://localhost:8020 (Hadoop Namenode address)
scripts.basepath=hdfs://localhost:8020/tmp/pig/scripts/ (Location in DFS where PIG scripts will be stored)
jars.basepath=hdfs://localhost:8020/tmp/pig/jars/ (Location in DFS where jar files will be stored)
requests.basepath=hdfs://localhost:8020/tmp/pig/requests/ (Location where request specific information will be stored)
max.threads=20 (size of thread pool for running PIG requests in parallel)

The core-site.xml and mapred-site.xml files are bundled along with the property files to provide cluster specific parameters like namenode address, jobtracker address in order to enable connecting to remote clusters. If the cluster is a secure cluster and uses authentication mechanisms like Kerberos then parameters like kerberos principal need to be provided in the mapred-site.xml and core-site.xml. Also, the queue to which jobs must be submitted also needs to provided in the mapred-site.xml

Different kinds of property files can be created based on the environment in which the service is going to be hosted. For example a prod.properties file can be created to house the settings for a production instance. To pick up the property file the following steps should be followed during startup of the Tomcat instance. The environment variable env should be set as the desired environment as follows:

export env=prod

This would make sure that prod.properties is picked up by the ConfigurationLoader at startup.

Project Structure

The directory structure of our project is explained in the Project Structure wiki

Known Issues and Feature Requests

Please use our Issues page to view the existing issues, to raise bugs and request for new features.

Contribution Guidelines

Eager to contribute? Steps to contribute to our project is available in our Contribution Guidelines wiki