Ask Your Question
2

How do you configure a Hive / Impala JDBC driver for Data Collector?

asked 2017-05-08 16:48:26 -0500

jeff gravatar image

updated 2017-08-23 10:31:36 -0500

metadaddy gravatar image

What driver Jar/class is supported, and how is the JDBC URI configured?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2017-05-08 16:53:04 -0500

jeff gravatar image

updated 2017-05-26 14:28:24 -0500

metadaddy gravatar image

StreamSets comes bundled with the open-source Hive JDBC driver. Using the default driver, URLs will look like the following:

  • Unsecured: jdbc:hive2://hive-server2-host.company.com:10000/dbName
  • LDAP Auth: jdbc:hive2://hive-server2-host.company.com:10000/dbName;user=username;password=*
  • Kerberos: jdbc:hive2://hive-server2-host.company.com:10000/dbName;principal=hive/hive-server2-host.company.com@COMPANY.COM
  • SSL + Kerberos: jdbc:hive2://hive-server2-host.company.com:10000/dbName;principal=hive/hive-server2-host.company.com@COMPANY.COM;ssl=true;sslTrustStore=/path/to/truststore.jks

Cloudera also provides a Hive driver. To install it, simply install one of the CDH stage libraries. Using the Cloudera Hive driver:

  • Unsecured: jdbc:hive2://hive-server2-host.company.com:10000/dbName
  • LDAP Auth: jdbc:hive2://hive-server2-host.company.com:10000/dbName;AuthMech=3;UID=username;PWD=*
  • Kerberos: jdbc:hive2://hive-server2-host.company.com:10000/dbName;AuthMech=1;KrbRealm=COMPANY.COM;KrbHostFQDN=hive-server2-host.company.com;KrbServiceName=hive
  • SSL + Kerberos: jdbc:hive2://hive-server2-host.company.com:10000/dbName;AuthMech=1;KrbRealm=COMPANY.COM;KrbHostFQDN=hive-server2-host.company.com;KrbServiceName=hive;SSL=1;SSLKeyStore=/path/to/truststore.jks

Cloudera also has an Impala driver. Download it from Cloudera here and install it into SDC. Using the Cloudera Impala driver:

  • Unsecured: jdbc:impala://impala-daemon-host.company.com:21050/dbName
  • LDAP Auth: jdbc:impala://impala-daemon-host.company.com:21050/dbName;AuthMech=3;UID=username;PWD=*
  • Kerberos: jdbc:impala://impala-daemon-host.company.com:21050/dbName;AuthMech=1;KrbRealm=COMPANY.COM;KrbHostFQDN=impala-daemon-host.company.com;KrbServiceName=impala
  • SSL + Kerberos: jdbc:impala://impala-daemon-host.company.com:21050/dbName;AuthMech=1;KrbRealm=COMPANY.COM;KrbHostFQDN=impala-daemon-host.company.com;KrbServiceName=impala;SSL=1;SSLKeyStore=/path/to/truststore.jks
edit flag offensive delete link more

Comments

I was wondering about Impala, but haven't had a reason yet to care enough to figure it out. +1!

jwood gravatar imagejwood ( 2017-05-13 18:21:42 -0500 )edit
4

answered 2017-05-09 14:54:32 -0500

rupal gravatar image

updated 2017-09-05 14:48:56 -0500

metadaddy gravatar image

All Hadoop distributions include hive-jdbc drivers pre-packaged. The examples shown in Jeff's answer will not only work for Cloudera but for all distributions where you want to use the pre-packaged Hive jdbc driver.

You can also use the hive-jdbc driver to connect directly to Impala:

  • Unsecured: jdbc:hive2://myhost.example.com:21050/;auth=noSasl

  • Kerberos: jdbc:hive2://myhost.example.com:21050/;principal=impala/myhost.example.com@H2.EXAMPLE.COM

  • LDAP Auth: jdbc:hive2://myhost.example.com:21050/test_db;user=fred;password=xyz123

If you proceed to use the Impala driver, ensure you install and configure this in the External Directory for Data Collector.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2017-05-08 16:48:26 -0500

Seen: 1,664 times

Last updated: Sep 05 '17