Connecting to Hive via Beeline using Kerberos keytab

左心房为你撑大大i 提交于 2019-12-05 08:14:41

I think you cannot connect with keytab file into beeline but you can get ticket with keytab using kinit and then pass the hive server principal with the jdbc connection string of beeline to connect.

kinit -k -t keytab principal

Connection string to connect with beeline

!connect jdbc:hive2://hostname:10000/default;principal=hive/_HOST@REALM

It is a bug, but it is not a critical one.

Though you provided kerberos details, still it will ask you the username and password. You can just enter -> enter, it allows us to connect.

Example:

!connect jdbc:hive2://:10000/default;principal=hive/_HOST@REALM.COM

Connecting to jdbc:hive2://:10000/default;principal=hive/_HOST@REALM.COM

Enter username for jdbc:hive2://:10000/default;principal=hive/_HOST@REALM.COM: press enter

Enter password for jdbc:hive2://:10000/default;principal=hive/_HOST@REALM.COM: press enter

Connected to: Apache Hive (version 0.13.1-cdh5.3.7-SNAPSHOT)
Driver: Hive JDBC (version 0.13.1-cdh5.3.7-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!