Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
avatar
Contributor

Steps to connect from Legacy Cluster to CDP Public Cloud Hive:

 

  1. Build a connection string as follows using Hive Server Endpoint from DataHub by just adding the sslTrustStore and trustStorePassword along with workload username and password for PAM authentication.
    jdbc:hive2://master0.repro.cloudera/default;transportMode=http;httpPath=new/cdp-proxy-api/hive;ssl=true;sslTrustStore=gateway-client-trust.jks;trustStorePassword=*****;user=chella;
  2. Get the JKS file downloaded from CDP Knox (Token Integration) and copy it to HDP/CDH host.
  3. Get the latest JDBC jar "hive-jdbc-3.1.0-SNAPSHOT-standalone.jar" from CDW.

    CDP Control Plane > Management Console > Data Warehouse > click the 3 dots from any of Hive VW and "Download JDBC JAR"
  4. Copy the jar "hive-jdbc-3.1.0-SNAPSHOT-standalone.jar"  to HDP/CDH host.
  5. Get into beeline from HDP/CDH host
  6. Add the jar using the following command
    Beeline version 3.1.0.3.1.5.26-1 by Apache Hive 
    0: jdbc:hive2://c1544-node2> !addlocaldriverjar /root/hive-jdbc-3.1.0-SNAPSHOT-standalone.jar
    
    scan complete in 22ms
  7. Connect using the string we built in step [1]
    0: jdbc:hive2://c1544-node2> !connect jdbc:hive2://master0.repro.cloudera/default;transportMode=http;httpPath=new/cdp-proxy-api/hive;ssl=true;sslTrustStore=gateway-client-trust.jks;trustStorePassword=*****;user=chella;
    
    Connecting to jdbc:hive2://master0.repro.cloudera/default;transportMode=http;httpPath=new/cdp-proxy-api/hive;ssl=true;sslTrustStore=gateway-client-trust.jks;trustStorePassword=*****;user=chella;
    
    Enter password for jdbc:hive2://master0.repro.cloudera/default: *************
    
    Connected to: Apache Hive (version 3.1.3000.7.2.10.6-1)
    
    Driver: Hive JDBC (version 3.1.0.3.1.5.26-1)
    
    Transaction isolation: TRANSACTION_REPEATABLE_READ
    
    1: jdbc:hive2://master0.repro>
971 Views