1. Ensure that the required related installations are in place, and place required files into the Hadoop distributed cache.
  2. Download and unpack the HCatalog distribution.
  3. Set the TEMPLETON_HOME environment variable to the base of the HCatalog REST server installation. This will usually be same as HCATALOG_HOME. This is used to find the Templeton configuration.
  4. Set JAVA_HOME,HADOOP_PREFIX, and HIVE_HOME environment variables
  5. Review the configuration and update or create webhcat-site.xml as required. Ensure that site specific component installation locations are accurate, especially the Hadoop configuration path. Configuration variables that use a filesystem path try to have reasonable defaults, but it's always safe to specify a full and complete path.
  6. Verify that HCatalog is installed and that the hcat executable is in the PATH.
  7. Build HCatalog using the command ant jar from the top level HCatalog directory.
  8. Start the REST server with the command sbin/webhcat_server.sh start.
  9. Check that your local install works. Assuming that the server is running on port 50111, the following command would give output similar to that shown.
    % curl -i http://localhost:50111/templeton/v1/status
    HTTP/1.1 200 OK
    Content-Type: application/json
    Transfer-Encoding: chunked
    Server: Jetty(7.6.0.v20120127)

Server Commands

  • Start the server: sbin/webhcat_server.sh start
  • Stop the server: sbin/webhcat_server.sh stop
  • End-to-end build, run, test: ant e2e


  • Ant, version 1.8 or higher
  • Hadoop, version 1.0.3 or higher
  • ZooKeeper is required if you are using the ZooKeeper storage class. (Be sure to review and update the ZooKeeper related Templeton configuration.)
  • HCatalog. Version 0.5.0 or higher. The hcat executable must be both in the PATH and properly configured in the Templeton configuration.
  • Permissions must be given to the user running the server. (see below)
  • If running a secure cluster, Kerberos keys and principals must be created. (see below)
  • Hadoop Distributed Cache. To use the Hive, Pig, or hadoop/streaming resources, see instructions below for placing the required files in the Hadoop Distributed Cache.

Hadoop Distributed Cache

The server requires some files be accessible on the Hadoop distributed cache. For example, to avoid the installation of Pig and Hive everywhere on the cluster, the server gathers a version of Pig or Hive from the Hadoop distributed cache whenever those resources are invoked. After placing the following components into HDFS please update the site configuration as required for each.

  • Hive: Download the hive tar.gz file and place it in HDFS.
    hadoop fs -put /tmp/hive-0.10.0.tar.gz /apps/templeton/hive-0.10.0.tar.gz
  • Pig: Download the Pig tar.gz file and place it into HDFS. For example:
    hadoop fs -put /tmp/pig-0.10.1.tar.gz /apps/templeton/pig-0.10.1.tar.gz
  • Hadoop Streaming: Place hadoop-streaming.jar into HDFS. For example, use the following command, substituting your path to the jar for the one below.
    hadoop fs -put $HADOOP_PREFIX/hadoop- \
  • Override Jars: Place override jars required (if any) into HDFS. Note: Hadoop versions prior to 1.0.3 require a patch (HADOOP-7987) to properly run Templeton. This patch is distributed with Templeton (located at templeton/src/hadoop_temp_fix/ugi.jar) and should be placed into HDFS, as reflected in the current default configuration.
    hadoop fs -put ugi.jar /apps/templeton/ugi.jar

The location of these files in the cache, and the location of the installations inside the archives, can be specified using the following Templeton configuration variables. (See the Configuration documentation for more information on changing Templeton configuration parameters.)

templeton.pig.archive hdfs:///apps/templeton/pig-0.10.1.tar.gz The path to the Pig archive.
templeton.pig.path pig-0.10.1.tar.gz/pig-0.10.1/bin/pig The path to the Pig executable.
templeton.hive.archive hdfs:///apps/templeton/hive-0.10.0.tar.gz The path to the Hive archive.
templeton.hive.path hive-0.10.0.tar.gz/hive-0.10.0/bin/hive The path to the Hive executable.
templeton.streaming.jar hdfs:///apps/templeton/hadoop-streaming.jar The path to the Hadoop streaming jar file.
templeton.override.jars hdfs:///apps/templeton/ugi.jar Jars to add to the HADOOP_CLASSPATH for all Map Reduce jobs. These jars must exist on HDFS.


Permission must given for the user running the templeton executable to run jobs for other users. That is, the templeton server will impersonate users on the Hadoop cluster.

Create (or assign) a Unix user who will run the Templeton server. Call this USER. See the Secure Cluster section below for choosing a user on a Kerberos cluster.

Modify the Hadoop core-site.xml file and set these properties:

hadoop.proxyuser.USER.groups A comma separated list of the Unix groups whose users will be impersonated.
hadoop.proxyuser.USER.hosts A comma separated list of the hosts that will run the hcat and JobTracker servers.

Secure Cluster

To run Templeton on a secure cluster follow the Permissions instructions above but create a Kerberos principal for the Templeton server with the name USER/host@realm

Also, set the templeton configuration variables templeton.kerberos.principal and templeton.kerberos.keytab