Mastering Hadoop 3
上QQ阅读APP看书,第一时间看更新

Configuring Docker containers

The first step is to specify the Docker configuration in YARN-site.xml. The Docker image that will be used for the YARN container must satisfy requirements such as Java home variable, and Hadoop home environment variables, including HDFS, YARN, and MAPRED, must be set. The variable names are JAVA_HOME, HADOOP_COMMON_PATH, HADOOP_HDFS_HOME, HADOOP_MAPRED_HOME, HADOOP_YARN_HOME, and HADOOP_CONF_DIR, as follows:

<property>
     <name>YARN.nodemanager.docker-container-executor.exec-    name</name>
      <value>docker -H=tcp://0.0.0.0:4243</value> 
<description> path to docker client </description>
</property>
<property>
<name>YARN.nodemanager.container-executor.class</name> <value>org.apache.Hadoop.YARN.server.nodemanager.DockerContainerExecutor</value>
<description> all job will be started as DockerCntainerExecutor. </description>
</property>