Is it possible to connect to Hive via beeline using (kerberos) keytab file similar to the approach used for JDBC at
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
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
来源:https://stackoverflow.com/questions/31196026/connecting-to-hive-via-beeline-using-kerberos-keytab