Configuring the WebHCat Server
About this task
/opt/mapr/hive/hive-<version>/hcatalog/etc/webhcat/webhcat-site.xml
When you set up WebHCat, you can configure file system and Zookeeper as storage.
Procedure
-
To configure storage for
WebHCat, add
the MapRFS location property.
<property> <name>templeton.storage.class</name> <value>org.apache.hive.hcatalog.templeton.tool.HDFSStorage</value> </property> <property> <name>templeton.storage.root</name> <value>/user/mapr/webhcat</value> <description>The path to the directory to use for storage</description> </property> -
To configure WebHCat for Pig:
-
Compress the Pig installation, then move the compressed file to the MapRFS
layer.
# cd /opt/mapr/pig # tar -czvf /tmp/pig-<version>.tar.gz pig-<version>/ # hadoop fs -mkdir /user/mapr/webhcat # hadoop fs -put /tmp/pig-<version>.tar.gz /user/mapr/webhcat/ -
Set the value of the
templeton.pig.archiveproperty to the location of the compressed file.<property> <name>templeton.pig.archive</name> <value>maprfs:///user/mapr/webhcat/pig-<version>.tar.gz</value> </property> -
Set the value of the
templeton.pig.pathproperty to the path inside the compressed Pig file where the Pig binary is located.<property> <name>templeton.pig.path</name> <value>pig-<version>.tar.gz/pig-<version>/bin/pig</value> </property>
-
Compress the Pig installation, then move the compressed file to the MapRFS
layer.
-
To configure WebHCat for Hive:
-
Compress the Hive installation, then move the compressed file to the file system
layer.
# cd /opt/mapr/hive # tar -czvf /tmp/hive-<version>.tar.gz hive-<version>/ # hadoop fs -mkdir /user/mapr/webhcat # hadoop fs -put /tmp/hive-<version>.tar.gz /user/mapr/webhcat -
Set the value of the
templeton.hive.archiveproperty to the location of the compressed file.<property> <name>templeton.hive.archive</name> <value>maprfs:///user/mapr/webhcat/hive-<version>.tar.gz</value> </property> -
Set the value of the
templeton.hive.pathproperty to the path inside the compressed Hive file where the Hive binary is located.<property> <name>templeton.hive.path</name> <value>hive-<version>.tar.gz/hive-<version>/bin/hive</value> </property>
-
Compress the Hive installation, then move the compressed file to the file system
layer.
-
To Configure WebHCat for streaming:
-
Copy the Streaming JAR to the file system layer.
# hadoop fs -put /opt/mapr/hadoop/hadoop-<version>/contrib/streaming/hadoop-<version>-dev-streaming.jar /user/mapr/webhcat -
Set the
templeton.streaming.jarproperty to the location of the streaming JAR.<property> <name>templeton.streaming.jar</name> <value>maprfs:///user/mapr/webhcat/hadoop-<version>-dev-streaming.jar</value> </property>
-
Copy the Streaming JAR to the file system layer.