无法使用Pyhive / impyla连接到不安全的Hive。无法启动SASL错误

时间:2017-09-21 17:41:42

标签: python hive pyhive impyla

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

0 个答案:

没有答案