eselyavka / liquibase-impala

Liquibase extension to add Impala Database support
Apache License 2.0
24 stars 18 forks source link

Usage with a Kerberized Hive #12

Open kkkkgg opened 6 years ago

kkkkgg commented 6 years ago

Hi,

i got this plugin working in a non kerberized environment, but i'm getting login problems with a kerberized one, in particular "Unexpected error running Liquibase: java.sql.SQLException: [Cloudera]HiveJDBCDriver Error initialized or created transport for authentication: Peer indicated failure: Unsupported mechanism type PLAIN." This happens after a kinit too.

My liquibase.properties is as follow: changeLogFile: /path/db.changelog.xml driver: com.cloudera.hive.jdbc41.HS2Driver url: jdbc:hive2://HOSTNAME:10000/DATABASE;principal=hive/HOSTNAME@DOMAIN

What i'm doing wrong? is Kerberos supported?

Thank you in advance for the answer.

eselyavka commented 6 years ago

@kkkkggI didn't test this plugin in Kerberized env. First, check that Cloudera JDBC driver is working properly with Kerberized Hive. I will try to set up Kerberized CDH cluster in pseudo-distributed mode and check the plugin.

dokson commented 6 years ago

Try to use make a jdbc string as the following:

jdbc:hive2://localhost:10000/DATABASE;AuthMech=1;KrbRealm=EXAMPLE.COM;KrbHostFQDN=hs2.example.com;KrbServiceName=hive;KrbAuthType=1

Have a look at this: https://www.cloudera.com/documentation/other/connectors/hive-jdbc/2-5-4/Cloudera-JDBC-Driver-for-Apache-Hive-Install-Guide-2-5-4.pdf