Last active
June 26, 2020 08:28
-
-
Save rajkrrsingh/e79c615d23562b606559ec65e5651e77 to your computer and use it in GitHub Desktop.
steps to configure KNOX over HiveServer2 HA on HDP-2.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. under Ambari-> knox -> Advanced topologies | |
2. add following snippet in advanced topologies | |
<provider> | |
<role>ha</role> | |
<name>HaProvider</name> | |
<enabled>true</enabled> | |
<param> | |
<name>HIVE</name> | |
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true;zookeeperEnsemble=rkk3.hdp.local:2181,rkk2.hdp.local:2181, | |
rkk1.hdp.local:2181;zookeeperNamespace=hiveserver2</value> | |
</param> | |
</provider> | |
<service> | |
<role>HIVE</role> | |
<!-- <url>http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}</url> --> | |
</service> | |
3. Restart KNOX | |
4. Open Beeline and connect to HS2 | |
beeline | |
Beeline version 1.2.1000.2.5.0.0-1133 by Apache Hive | |
beeline> !connect jdbc:hive2://rkk1.hdp.local:8443/;ssl=true;sslTrustStore=/var/lib/knox/data-2.5.0.0-1133/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/default/hive | |
Connecting to jdbc:hive2://rkk1.hdp.local:8443/;ssl=true;sslTrustStore=/var/lib/knox/data-2.5.0.0-1133/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/default/hive | |
Enter username for jdbc:hive2://rkk1.hdp.local:8443/;ssl=true;sslTrustStore=/var/lib/knox/data-2.5.0.0-1133/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/default/hive: guest | |
Enter password for jdbc:hive2://rkk1.hdp.local:8443/;ssl=true;sslTrustStore=/var/lib/knox/data-2.5.0.0-1133/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/default/hive: ************** | |
16/11/26 19:58:04 [main]: WARN jdbc.Utils: ***** JDBC param deprecation ***** | |
16/11/26 19:58:04 [main]: WARN jdbc.Utils: The use of hive.server2.transport.mode is deprecated. | |
16/11/26 19:58:04 [main]: WARN jdbc.Utils: Please use transportMode like so: jdbc:hive2://<host>:<port>/dbName;transportMode=<transport_mode_value> | |
16/11/26 19:58:04 [main]: WARN jdbc.Utils: ***** JDBC param deprecation ***** | |
16/11/26 19:58:04 [main]: WARN jdbc.Utils: The use of hive.server2.thrift.http.path is deprecated. | |
16/11/26 19:58:04 [main]: WARN jdbc.Utils: Please use httpPath like so: jdbc:hive2://<host>:<port>/dbName;httpPath=<http_path_value> | |
Connected to: Apache Hive (version 1.2.1000.2.5.0.0-1133) | |
Driver: Hive JDBC (version 1.2.1000.2.5.0.0-1133) | |
Transaction isolation: TRANSACTION_REPEATABLE_READ | |
0: jdbc:hive2://rkk1.hdp.local:8443/> show tables; | |
+-----------+--+ | |
| tab_name | | |
+-----------+--+ | |
| xx | | |
+-----------+--+ | |
1 row selected (0.201 seconds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment