在YARN中,托管和非托管应用程序管理器之间有什么区别

时间:2014-02-19 17:38:13

标签: yarn

我正在试验YARN 2.2中的分布式Shell示例,并希望有人能够澄清托管和非托管应用程序管理器之间的区别是什么?

例如,客户端代码中出现以下行

// unmanaged AM
appContext.setUnmanagedAM(true);

但是我无法找到解释此行对执行行为的区别的文档。

非常感谢。

2 个答案:

答案 0 :(得分:7)

setUnmanagedAM(true)用于调试目的,即它以本地模式运行应用程序管理器,并且不将其提交到集群,因此更容易进入代码和调试。 您可以在带有纱线的hadoop-yarn-applications-unmanaged-am-launcher.jar

中看到它正在使用中

答案 1 :(得分:0)

检查相应的JIRA票证:JIRA-420JIRA-419 (client side)

Currently, the RM itself manages the AM by allocating a container for it and negotiating the launch on the NodeManager and manages the AM lifecycle. Thereafter, the AM negotiates resources with the RM and launches tasks to do the real work.
It would be a useful improvement to enhance this model by allowing the AM to be launched independently by the client without requiring the RM. These AM's would be launched on a gateway machine that can talk to the cluster. This would open up new use cases such as the following
1) Easy debugging of AM, specially during initial development. Having the AM launched on an arbitrary cluster node makes it hard to looks at logs or attach a debugger to the AM. If it can be launched locally then these tasks would be easier.
2) Running AM's that need special privileges that may not be available on machines managed by the NodeManager

有关不受管理的AM的更多实施详细信息的博客文章:click-me

Impala如何借助非托管应用程序管理资源的示例:Llama