dropbox / dropbox/PyHive

Please let me know - how to connect hive server2 using kerbos principal jdbc

Open
#300 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

We have configuration in place the following beeline jdbc via keytab authentication and the same we are trying to establish using beeline.

beeline -u "jdbc:hive2://hostname:10000/default;principal=hive/hostname@relam"

Succesful ///

Please let me know the following string to connect via python - jdbc in place port.

conn = hive.connect(host='hostname',port=10000,database='default',username='local user',auth='KERBEROS',kerberos_service_name='hive')

$ python3 test_conn_hive.py
Traceback (most recent call last):
File "test_conn_hive.py", line 3, in
conn = hive.connect(host='hostname',port=10000,database='default',username='local user',auth='KERBEROS',kerberos_service_name='hive')
File "/usr/local/lib/python3.6/site-packages/pyhive/hive.py", line 94, in connect
return Connection(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pyhive/hive.py", line 198, in __init__
response = self._client.OpenSession(open_session_req)
File "/usr/local/lib/python3.6/site-packages/TCLIService/TCLIService.py", line 187, in OpenSession
return self.recv_OpenSession()
File "/usr/local/lib/python3.6/site-packages/TCLIService/TCLIService.py", line 199, in recv_OpenSession
(fname, mtype, rseqid) = iprot.readMessageBegin()
File "/usr/local/lib/python3.6/site-packages/thrift/protocol/TBinaryProtocol.py", line 134, in readMessageBegin
sz = self.readI32()
File "/usr/local/lib/python3.6/site-packages/thrift/protocol/TBinaryProtocol.py", line 217, in readI32
buff = self.trans.readAll(4)
AttributeError: 'TSaslClientTransport' object has no attribute 'readAll'

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.