YARN:容器和 JVM

YARN: Containers and JVM

谁能帮我理解一下 YARN 中 JVM 和容器之间的关系?

指向一些有用链接的指针也会有所帮助。

Is it one JVM for each container? or multiple containers in a single JVM? or there is no relation between JVM and containers?

当然有关系,而且是one-to-one。对于每个需要创建的容器,都会生成一个新的 java 进程 (JVM)。

现在,如果您不 运行 正在使用超级模式,请考虑以下内容:-

How JVMs are created, is it one JVM for each task? can multiple tasks run in the same JVM at the same time? (I'm aware of ubertasking where many tasks (maps/reduce) can run in same JVM one after the other).

看,任务被安排到 运行 集群中的某个节点上。根据任务的要求(内存和cpu),决定容器的容量。此外,您还可以在下面的链接中找到某些参数。
每个任务尝试都安排在 JVM 上。

when a resource manager allocates containers for a job, does multiple tasks inside the same job use same container for tasks running in same node? or separate containers for each task based on availability?

根据集群中的资源可用性为每个任务生成单独的容器。

这里有一些非常有用的链接-
http://ercoppa.github.io/HadoopInternals/AnatomyMapReduceJob.html
https://blog.cloudera.com/blog/2015/09/untangling-apache-hadoop-yarn-part-1/
http://blog.cloudera.com/blog/2014/04/apache-hadoop-yarn-avoiding-6-time-consuming-gotchas/