使用Kerberos密钥表通过Beeline连接到Hive [英] Connecting to Hive via Beeline using Kerberos keytab
问题描述
是否可以使用(kerberos)keytab文件通过beeline连接到Hive,类似于
Is it possible to connect to Hive via beeline using (kerberos) keytab file similar to the approach used for JDBC at
PS:beeline不支持使用用户名和密码在Kerberos受保护的配置单元服务器上进行连接.但我正在寻找一种将其与keytab文件连接的方法. http://doc.mapr.com /display/MapR40x/Configuring + Hive + on + a + Secure + Cluster#ConfiguringHiveonaSecureCluster-UsingBeelinewithKerberos
PS : beeline does support connecting on a kerberos secured hive server with username and password. But I am looking for a way to connect it with a keytab file. http://doc.mapr.com/display/MapR40x/Configuring+Hive+on+a+Secure+Cluster#ConfiguringHiveonaSecureCluster-UsingBeelinewithKerberos
推荐答案
我认为您无法将keytab文件连接到beeline中,但是可以使用kinit
使用keytab获得票证,然后将hive服务器主体与jdbc连接字符串一起传递要连接的蜜蜂.
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
与beeline连接的连接字符串
Connection string to connect with beeline
!connect jdbc:hive2://hostname:10000/default;principal=hive/_HOST@REALM
这篇关于使用Kerberos密钥表通过Beeline连接到Hive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!