在pyhive中设置队列给出错误

时间:2018-07-03 08:56:12

标签: python hadoop hive


我正在尝试使用pyhive模块连接到蜂巢时设置队列名称。
我在Hadoop群集上使用JupyterHub。

from pyhive import hive

cur = hive.connect(host='cluster',
                    port=10000
                   ,auth="KERBEROS"
                   ,kerberos_service_name="hive"
                   ,configuration={'mapred.job.queue.name':'disco'}
                  ).cursor()

我得到一个错误:

OperationalError: TOpenSessionResp(status=TStatus(errorCode=0, errorMessage=u'Failed to open new session: java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot modify mapred.job.queue.name at runtime. It is not in list of params that are allowed to be modified at runtime', sqlState=None, infoMessages=[u'*org.apache.hive.service.cli.HiveSQLException:Failed to open new session: java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot modify mapred.job.queue.name at runtime. It is not in list of params that are allowed to be modified at runtime:13:12', u'org.apache.hive.service.cli.session.SessionMan
etc....

最重要的一句话是:

Cannot modify mapred.job.queue.name at runtime. It is not in list of params that are allowed to be modified at runtime'

此参数是在建立连接时设置的,因此不在运行时中。 我究竟做错了什么?有什么想法吗?

致谢

毛巾

0 个答案:

没有答案