1

有人可以帮我解决 Windows 10 上的以下问题吗?

这是我拥有的python代码:

from impala.dbapi import connect
from contextlib import closing

if __name__ == '__main__':

    with closing(connect(host='host_name_with_hiveserver2',
                 port=10000,
                 database='databasename',
                 user='username',
                 password='password',
                 auth_mechanism='PLAIN')) as conn:
        cursor = conn.cursor()

已安装 Python 包的列表:

  • 位数组==0.8.1
  • impyla==0.14.0
  • sasl==0.2.1
  • 六==1.10.0
  • 节俭==0.9.3
  • 节俭-sasl==0.2.1

版本:

  • 操作系统版本:Microsoft Windows 10(64 位)
  • DBMS 版本:1.2.1.2.3.6.0-3796 Apache Hive

追溯:

Traceback (most recent call last):
  File "D:/vinokur/projects/python/hive_connect/main.py", line 11, in <module>
    auth_mechanism='PLAIN')) as conn:
  File "D:\vinokur\projects\python\virtual_envs\pip_impyla\lib\site-packages\impala\dbapi.py", line 147, in connect
    auth_mechanism=auth_mechanism)
  File "D:\vinokur\projects\python\virtual_envs\pip_impyla\lib\site-packages\impala\hiveserver2.py", line 758, in connect
    transport.open()
  File "D:\vinokur\projects\python\virtual_envs\pip_impyla\lib\site-packages\thrift_sasl\__init__.py", line 72, in open
    message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2

按照 python的说明,我能够在 Linux Ubuntu 16.04 上成功运行此代码无法连接 hiveserver2票证。

提前致谢!

4

0 回答 0