我正在尝试访问不安全的配置单元(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
我的 impyla 代码:
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?