本文来源:IT书,itbook.com
原因
启动一个 Yarn Application,首先需要启动 Application Master (简称 AM) 进程,而 Yarn 是按比例将资源分配给 Application Master 应用,默认只有 20%,即所有 Yarn Application Master 进程加起来占用的资源,不能超过集群全部资源(资源包含两部分:CPU 和 内存)的 20%,如果超过了 20%,将不能为 Application Maste 分配资源,而可以尝试调大这个占比,容许运行更多的 Application Master。
操作
进入 Ambari YARN Queue Manager 界面:
修改 CAPACITY-SCHEDULER 中的 Maximum AM Resource,如图,尝试调大,如 100%,再次运行的 app,观察是否能启动: