Hive 卡住查询,可能是什么问题?

Hive getting stuck for queries, what can be the issue?

我已经安装了 Hive,它可以正确执行基本查询,但是对于像 distinct 这样的查询会卡住。在去 link 检查它显示的问题时

ACCEPTED: waiting for AM container to be allocated, launched and register with RM.

作为 YarnApplicationStage。

我也尝试通过增加 YARN 调度程序容量的百分比来更改 yarn-site.xml。但没有任何效果。它似乎仍然停留在同一个步骤。我附上了 yarn-site.xml 代码、应用程序屏幕截图以及配置单元屏幕截图。也没有不健康的节点,并附上相同的屏幕截图。

<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>mapreduce.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>127.0.0.1:8032</value>
</property>
<property>
<name>yarn.scheduler.capacity.maximum-am-resource-percent</name>
<value>1.0</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>4096</value>
<description>Physical memory, in MB, to be made available to running containers</description>
</property>   
</configuration>

错误图片顺序如下,

Hive 卡住错误

应用程序管理器

节点详细信息

Yarn 节点管理器日志

[4 [5

您的集群指标显示您没有 vcores、内存和活动节点,这意味着您无法进行任何处理,直到您将节点管理器添加到您的集群。

资源管理器是调度程序,但节点管理器提供计算资源。

您在执行 DISTINCT 时看到这一点的原因是 Hive 可以在不触发 MapReduce 作业的情况下处理某些查询。

参考资料

我解决了这个错误。问题出在 etc/hosts 文件上。我的系统的 IP 已更改,因为配置单元 运行 不正确。