Reply
New Contributor
Posts: 1
Registered: ‎06-30-2017

How to use python connect impala with kerberos?

I wany to use python connect impala,and the cluster is kerberozied,I can use java jdbc successful ,and the settings like this :

 

UserGroupInformation.loginUserFromKeytab("username/mydomain.com@mydomain.COM","/usr/username.keytab");  

 

jdbc:impala://192.168.1.10:21050/default;AuthMech=1;KrbRealm='mydomain.com';KrbHostFQDN=hostalias;KrbServiceName=impala

 

I have try Impyla,but failed, it throws sasl can't start,how can i connect impala with python?

Posts: 334
Topics: 11
Kudos: 48
Solutions: 27
Registered: ‎09-02-2016

Re: How to use python connect impala with kerberos?

@yueyang

 

Pls try to add the below principal in your connection string, it 'may' help you

 

";principal=impala/hostname@REALM"

 

hostname - hostname where you have configured impala/hive

REALM - for your kerberos

Highlighted
Cloudera Employee
Posts: 116
Registered: ‎03-23-2015

Re: How to use python connect impala with kerberos?

Hi yueyang,

Can you please share your impyla source code and the error you are getting? That will help me understand why it failed.

Thanks
Announcements