Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (2)

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,

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

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">
    <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>

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

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

Example:

<url>http://abcd.example.com:10501/cliservice</url>

5) Restart Knox service.

2,772 Views
Comments
Contributor

@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?

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎12-01-2017 09:44 PM
Updated by:
 
Contributors
Top Kudoed Authors