为什么 YARN 会为一个简单的计数操作占用大量内存?

Why does YARN takes a lot of memory for a simple count operation?

我有一个标准配置的 HDP 2.2 环境,其中包含 Hive、HBase 和 YARN。

我已经使用 Hive (/w HBase) 对具有大约 1000 万行的 table 执行了一个简单的计数操作,结果 YARN 消耗了 10gb 的内存。

如何减少内存消耗?为什么它需要这么多内存来计算行数?

一个简单的计数操作涉及后端的 map reduce 作业。在您的案例中,这涉及 1000 万行。看 here for a better explanation. Well this is just for the things happening at the background and execution time and not your question regarding memory requirements. Atleast, it will give you a heads up for the places to look for. This 也几乎没有加速的解决方案。快乐编码