Configure and Start Apache WebHCat
Note | |
---|---|
The |
You must replace your configuration after upgrading. Copy
/etc/hive-webhcat/conf
from the template to the conf directory in webhcat hosts.Modify the Apache WebHCat configuration files.
Upload Pig, Hive and Sqoop tarballs to HDFS as the $HDFS_User (in this example, hdfs):
su - hdfs -c "hdfs dfs -mkdir -p /hdp/apps/2.5.0.0-<$version>/pig/" su - hdfs -c "hdfs dfs -mkdir -p /hdp/apps/2.5.0.0-<$version>/hive/" su - hdfs -c "hdfs dfs -mkdir -p /hdp/apps/2.5.0.0-<$version>/sqoop/" su - hdfs -c "hdfs dfs -put /usr/hdp/2.5.0.0-<$version>/pig/pig.tar.gz /hdp/apps/2.5.0.0-<$version>/pig/" su - hdfs -c "hdfs dfs -put /usr/hdp/2.5.0.0-<$version>/hive/hive.tar.gz /hdp/apps/2.5.0.0-<$version>/hive/" su - hdfs -c "hdfs dfs -put /usr/hdp/2.5.0.0-<$version>/sqoop/sqoop.tar.gz /hdp/apps/2.5.0.0-<$version>/sqoop/" su - hdfs -c "hdfs dfs -chmod -R 555 /hdp/apps/2.5.0.0-<$version>/pig" su - hdfs - "hdfs dfs -chmod -R 444 /hdp/apps/2.5.0.0-<$version>/pig/pig.tar.gz" su - hdfs -c "hdfs dfs -chmod -R 555 /hdp/apps/2.5.0.0-<$version>/hive" su - hdfs -c "hdfs dfs -chmod -R 444 /hdp/apps/2.5.0.0-<$version>/hive/hive.tar.gz" su - hdfs -c "hdfs dfs -chmod -R 555 /hdp/apps/2.5.0.0-<$version>/sqoop" su - hdfs -c "hdfs dfs -chmod -R 444 /hdp/apps/2.5.0.0-<$version>/sqoop/sqoop.tar.gz" su - hdfs -c "hdfs dfs -chown -R hdfs:hadoop /hdp"
Add the following property if it is not present in webhcat-site.xml:
<property> <name>templeton.libjars</name> <value>/usr/hdp/current/zookeeper-client/zookeeper.jar,/usr/hdp/current/hive-client/lib/hive-common.jar</value> <description>Jars to add the classpath.</description> </property>
Add new proxy users, if needed. In core-site.xml, make sure the following properties are also set to allow WebHCat to impersonate your additional HDP 2.5.0 groups and hosts:
<property> <name>hadoop.proxyuser.hcat.groups</name> <value>*</value> </property> <property> <name>hadoop.proxyuser.hcat.hosts</name> <value>*</value> </property>
Where:
hadoop.proxyuser.hcat.group
Is a comma-separated list of the Unix groups whose users may be impersonated by 'hcat'.
hadoop.proxyuser.hcat.hosts
A comma-separated list of the hosts which are allowed to submit requests by 'hcat'.
Start WebHCat:
su - hcat -c "/usr/hdp/current/hive-webhcat/sbin/webhcat_server.sh start"
Smoke test WebHCat.
If you have a non-secure cluster, on the WebHCat host machine, run the following command to check the status of WebHCat server:
curl http://$WEBHCAT_HOST_MACHINE:20111/templeton/v1/status
You should see the following return status:
"status":"ok","version":"v1"
If you are using a Kerberos secure cluster, run the following command:
curl --negotiate -u: http://$WEBHCAT_HOST_MACHINE:20111/templeton/v1/status
You should see the following return status
{"status":"ok","version":"v1"}[machine@acme]$