from pyhive import hive
defmain():
conn = hive.Connection(
host='192.168.1.18',
port=10000,
username='hive',
database='default',
auth='NOSASL')
cursor = conn.cursor()
cursor.execute('show databases')
res = cursor.fetchall()for x in res:print(x)
conn.close()if __name__ =="__main__":
main()
问题解决
thrift.transport.TTransport.TTransportException: Could not start SASL: b’Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2’