Hi,

I am trying to connect to hiveserver2 from python, and i have tried steps
as mentioned here : https://cwiki.apache.org/confluence/display/Hive/
Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDriver.

I am not able to connect to it.

I was getting sasl issues, so i changed the authMechanism to NOSASL from
PLAIN. Apart from that rest of the things are same.

After that, i am getting following trace:

File "simple.py", line 8, in <module>

    database='default') as conn:

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/pyhs2/__init__.py", line 7, in connect

    return Connection(*args, **kwargs)

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/pyhs2/connections.py", line 47, in __init__

    res = self.client.OpenSession(TOpenSessionReq(username=user,
password=password, configuration=configuration))

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/pyhs2/TCLIService/TCLIService.py", line 154, in OpenSession

    return self.recv_OpenSession()

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/pyhs2/TCLIService/TCLIService.py", line 165, in
recv_OpenSession

    (fname, mtype, rseqid) = self._iprot.readMessageBegin()

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/thrift/protocol/TBinaryProtocol.py", line 140, in
readMessageBegin

    name = self.trans.readAll(sz)

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/thrift/transport/TTransport.py", line 58, in readAll

    chunk = self.read(sz - have)

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/thrift/transport/TTransport.py", line 159, in read

    self.__rbuf = StringIO(self.__trans.read(max(sz, self.__rbuf_size)))

  File "/home/allocation/.pyenv/versions/2.7.12/lib/python2.7/
site-packages/thrift/transport/TSocket.py", line 118, in read

    message='TSocket read 0 bytes')


What else should i look at?


Regards,

Twinkle

Reply via email to