有人可以帮我解决下面在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软件包列表:
版本:
回溯:
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 cannot connect hiveserver2票证的说明在Linux Ubuntu 16.04上成功运行此代码。
提前致谢!