How to setup knox for Hive2(LLAP) service
Short Description:
How to configure KNOX for Hive1 and Hive2(LLAP) in parallel.
Article
By default KNOX is configured for Hive1, this article will help you to configure KNOX for Hive2(LLAP).
Step 1. Before configuring KNOX for Hive2, you have to configure Hive2 for http mode as,
Go to Ambari-> Services -> Hive -> configs -> custom hive-interactive-site.xml -> add below properties,
3) Edit the services.xml and rewrite.xml as below:- 4) Go to Ambari -> KNOX -> configs -> Edit the Advanced topology of your KNOX service and add LLAP service as, Example: 5) Restart Knox service.hive.server2.thrift.http.path=cliservice
hive.server2.transport.mode=http
Restart Hive service.
Step 2. Now configure KNOX for Hive2(LLAP) as,
1) Go to the below location in your KNOX server machine:-# cd /usr/hdp/<HDP VERSION>/knox/data/services
2) Copy the hive directory present in the location and rename it as llap# cp -rp hive llap
# cd llap/0.13.0/
# vim service.xml
------------
<service role="LLAP" name="llap" version="0.13.0">
<routes>
<route path="/llap"/>
</routes>
<dispatch classname="org.apache.hadoop.gateway.hive.HiveDispatch" ha-classname="org.apache.hadoop.gateway.hive.HiveHaDispatch"/>
</service># vim rewrite.xml
------------
<rules>
<rule dir="IN" name="LLAP/llap/inbound" pattern="*://*:*/**/llap">
<rewrite template="{$serviceUrl[LLAP]}"/>
</rule>
</rules><service>
<role>LLAP</role>
<url>http://<LLAP server hostname>:<HTTP PORT NUMBER>/{{hive_http_path}}</url>
</service><url>http://abcd.example.com:10501/cliservice</url>

