Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3611 Support Docker Containers In LinuxContainerExecutor
  3. YARN-3853

Add docker container runtime support to LinuxContainterExecutor

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • yarn

    Description

      Create a new DockerContainerRuntime that implements support for docker containers via container-executor. LinuxContainerExecutor should default to current behavior when launching containers but switch to docker when requested.

      Overview
      ===
      The current mechanism of launching/signaling containers is moved to its own (default) container runtime. In order to use docker container runtime a couple of environment variables have to be set. This will have to be revisited when we have a first class client side API to specify different container types and associated parameters. Using ‘pi’ as an example and using a custom docker image, this is how you could use the docker container runtime (LinuxContainerExecutor must be in use and the docker daemon needs to be running) :

      export YARN_EXAMPLES_JAR=./share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar
      bin/yarn jar $YARN_EXAMPLES_JAR pi -Dmapreduce.map.env="YARN_CONTAINER_RUNTIME_TYPE=docker,YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=ashahab/hadoop-trunk" -Dyarn.app.mapreduce.am.env="YARN_CONTAINER_RUNTIME_TYPE=docker,YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=ashahab/hadoop-trunk"  -Dmapreduce.reduce.env="YARN_CONTAINER_RUNTIME_TYPE=docker,YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=ashahab/hadoop-trunk" 4 1000
      

      LinuxContainerExecutor can delegate to either runtime on a per container basis. If the docker container type is selected, LinuxContainerExecutor delegates to the DockerContainerRuntime which in turn uses docker support in the container-executor binary to launch/manage docker containers ( see YARN-3852 ) .

      Attachments

        1. YARN-3853.001.patch
          122 kB
          Sidharta Seethana
        2. YARN-3853.002.patch
          122 kB
          Sidharta Seethana

        Issue Links

          Activity

            People

              sidharta-s Sidharta Seethana
              sidharta-s Sidharta Seethana
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: