What is a container in YARN? Is it same as the child JVM in which the tasks on the nodemanager run or is it different?
Container :
The logical lease on resources and the actual process spawned on the node is used interchangeably. It is same process in which tasks(or AM) runs. To start container we provide container object and CLC (ContainerLaunchContext) in which we set list of commands to run tasks (or AM).
nmClient.startContainer(container, clcObj)
ContainerLaunchContext code snippet :
.
.
.
/**
* Add the list of commands for launching the container. All
* pre-existing List entries are cleared before adding the new List
* @param commands the list of commands for launching the container
*/
@Public
@Stable
public abstract void setCommands(List commands);