What is a container in YARN?

后端 未结 9 886
夕颜
夕颜 2020-12-13 04:06

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?

9条回答
  •  無奈伤痛
    2020-12-13 04:52

    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);
    
    

提交回复
热议问题