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