欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

pyhive 连接 Hive 时错误

发布时间:2023/11/30 53 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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>

    转载于:https://www.cnblogs.com/xueweihan/p/9216435.html

    总结

    以上是生活随笔为你收集整理的pyhive 连接 Hive 时错误的全部内容,希望文章能够帮你解决所遇到的问题。

    如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。