Community Articles

Find and share helpful community-sourced technical articles.
Labels (2)

Short Description:

How to configure KNOX for Hive1 and Hive2(LLAP) in parallel.


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,


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

3) Edit the services.xml and rewrite.xml as below:-

# cd llap/0.13.0/
# vim service.xml
<service role="LLAP" name="llap" version="0.13.0">
        <route path="/llap"/>
    <dispatch classname="org.apache.hadoop.gateway.hive.HiveDispatch" ha-classname="org.apache.hadoop.gateway.hive.HiveHaDispatch"/>

# vim rewrite.xml
    <rule dir="IN" name="LLAP/llap/inbound" pattern="*://*:*/**/llap">
        <rewrite template="{$serviceUrl[LLAP]}"/>

4) Go to Ambari -> KNOX -> configs -> Edit the Advanced topology of your KNOX service and add LLAP service as,

	<url>http://<LLAP server hostname>:<HTTP PORT NUMBER>/{{hive_http_path}}</url>



5) Restart Knox service.


@nshelke Thanks worked fine. Tried to configure it in HA mode analogously to the HIVE service, but it didn't work out. Did you try it in HA mode as well?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎12-01-2017 09:44 PM
Updated by:
Top Kudoed Authors