THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
To enable cgroups for mesos-slave, start the slave with the following flag:
...
Code Block | ||
---|---|---|
| ||
--isolation=cgroups/cpu,cgroups/mem |
...
...
Enabling cgroups for YARN NodeManager
To enable cgroups for YARN NodeManager:1.
- Edit the
...
- $YARN_HOME/etc/hadoop/yarn-site.
...
- xml file.
...
- Edit the
...
- $YARN_HOME/etc/hadoop/myriad-default-config.
...
- yml file.
Modify the `$YARN$YARN_HOME/etc/hadoop/yarn-site.xml` xml file by adding the following content:```xml
Code Block |
---|
<property> |
...
<description>who will execute(launch) the containers.</description> |
...
<name>yarn.nodemanager.container-executor.class</name> |
...
<value>${yarn.nodemanager.container-executor.class}</value> |
...
</property> |
...
<property> |
...
<description>The class which should help the LCE handle resources.</description> |
...
<name>yarn.nodemanager.linux-container-executor.resources-handler.class</name> |
...
<value>${yarn.nodemanager.linux-container-executor.resources-handler.class}</value> |
...
</property> |
...
<property> |
...
<name>yarn.nodemanager.linux-container-executor.cgroups.hierarchy</name> |
...
<value>${yarn.nodemanager.linux-container-executor.cgroups.hierarchy}</value> |
...
</property> |
...
<property> |
...
<name>yarn.nodemanager.linux-container-executor.cgroups.mount</name> |
...
<value>${yarn.nodemanager.linux-container-executor.cgroups.mount}</value> |
...
</property> |
...
<property> |
...
<name>yarn.nodemanager.linux-container-executor.cgroups.mount-path</name> |
...
<value>${yarn.nodemanager.linux-container-executor.cgroups.mount-path}</value> |
...
</property> |
...
<property> |
...
<name>yarn.nodemanager.linux-container-executor.group</name> |
...
<value>${yarn.nodemanager.linux-container-executor.group}</value> |
...
</property> |
...
<property> |
...
<name>yarn.nodemanager.linux-container-executor.path</name> |
...
<value>${yarn.home}/bin/container-executor</value> |
...
</property> |
```
Modify the `$YARN$YARN_HOME/etc/hadoop/myriad-default-config.yml` yml file by adding the following content:```yaml
Code Block |
---|
... |
...
nodemanager: |
...
cgroups: true |
...
... |
...
Note |
---|
At this time, YARN's NodeManager only works with CPU subsystem. |
{% include endnote.html %}