我正在尝试使用Tez使用impyla连接到配置单元0.14服务器:
from impala.dbapi import connect
from impala.utils import to_pandas
connection = connect(host='myhost', port=10000, auth_mechanism='PLAIN')
cursor = connection.cursor(configuration={'job.queue.name':'myqueue'})
cursor.execute('show databases') # works ok
cursor.fetchall() # works ok
cursor.execute('select field1, field2 from mydb.mytable where field1 > 2015') # breaks!
df = to_pandas(cursor) # never gets here错误:
HiveServer2Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask怎么一回事?看起来configuration并没有被使用。
发布于 2016-01-29 01:04:56
Impyla实现了Python database API。查看文档,看起来cursor()方法不接受任何参数。execute(),然而,takes a configuration kwarg。尝试:
cursor.execute('select field1, field2 from mydb.mytable where field1 > 2015', configuration={'job.queue.name':'myqueue'})https://stackoverflow.com/questions/35023444
复制相似问题