无法使用pyhive/impyla连接到不安全的配置单元无法启动sasl错误

slsn1g29  于 2021-06-26  发布在  Hive
关注(0)|答案(0)|浏览(222)

我正在尝试访问不安全的配置单元(hive.server2.authentication为none),在pyhive和impala中都收到以下错误消息:

TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2

我的 Impala 密码:

from impala.dbapi import connect
conn = connect(host='my_host_name', port=10000, auth_mechanism='PLAIN')
cursor = conn.cursor()
cursor.execute('SHOW TABLES')
print cursor.description  # prints the result set's schema
for table in cursor.fetchall():
    print table
results = cursor.fetchall()

我的pyhive代码:

from pyhive import hive
conn = hive.Connection(host='my_host_name' , port=10000, auth='NONE' )
cursor = conn.cursor()
cursor.execute("SHOW TABLES")
for table in cursor.fetchall():
    print table

有什么办法解决这个问题吗?或者其他让我连接到hive的python API?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题