pyhive 连接 Hive 时错误
一、User: xx is not allowed to impersonate xxx'
解决办法:修改 core-site.xml
文件,加入下面的内容后重启 hadoop。
<property>
<name>hadoop.proxyuser.xx.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.xx.groups</name>
<value>*</value>
</property>
Tips:注意是 xx
不是 xxx
二、ACCEPTED: waiting for AM container to be allocated, launched and register with RM.
现象为:
- 查看 node 的健康状态:http://master:8088/cluster/cluster ,无活跃 node
- pyhive 执行 insert 命令卡住,一直处于 accept 状态。
- YarnApplicationState 为:ACCEPTED: waiting for AM container to be allocated, launched and register with RM.
- slave yarn 日志为:Retrying connect to server: 0.0.0.0/0.0.0.0:8031. Already tried 0 time(s); retry policy is...
解决办法:
切记启动 hdfs 后,要配置启动 yarn。配置如下:
<configuration>
<property>
<name>yarn.resourcemanager.address</name>
<value>master:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>master:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>master:8031</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
作者:削微寒
扫描左侧的二维码可以联系到我
本作品采用署名-非商业性使用-禁止演绎 4.0 国际 进行许可。