This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat <path to your container-executor.cfg file> | |
yarn.nodemanager.linux-container-executor.group=<your hadoop user group> | |
min.user.id=1000 | |
$ chown root:root bin/container-executor | |
$ chmod 6050 bin/container-executor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CPU usage is the column that starts with 98.7 | |
20564 criccomi 20 0 1022m 107m 13m S 98.5 0.2 6:19.07 /export/apps/jdk/JDK-1_6_0_27/bin/java -Xmx160M -XX:+PrintGCDateStamps -Xloggc:/home/criccomi/Downloads/hadoop-2.0.5-alpha/logs/userlogs/application_1371055675984_0006/container_1371055675984_0006_01_000002/gc.log -Dlog4j.configuration=file:/tmp/hadoop-cri | |
20685 criccomi 20 0 1022m 109m 13m S 98.0 0.2 6:18.63 /export/apps/jdk/JDK-1_6_0_27/bin/java -Xmx160M -XX:+PrintGCDateStamps -Xloggc:/home/criccomi/Downloads/hadoop-2.0.5-alpha/logs/userlogs/application_1371055675984_0007/container_1371055675984_0007_01_000002/gc.log -Dlog4j.configuration=file:/tmp/hadoop-cri | |
21407 criccomi 20 0 1022m 110m 13m S 97.7 0.2 6:09.84 /export/apps/jdk/JDK-1_6_0_27/bin/java -Xmx160M -XX:+PrintGCDateStamps -Xloggc:/home/criccomi/Downloads/hadoop-2.0.5-alpha/logs/userlogs/application_1371055675984_0009/container_1371055675984_0009_01_000002/gc.log -Dlog4j.configuration=file:/tmp/hadoop-cri | |
20766 criccomi 20 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /cgroup/cpu/hadoop-yarn/container_1371055675984_0001_01_000002/cpu.shares | |
1024 | |
$ echo 10 > /cgroup/cpu/hadoop-yarn/container_1371055675984_0001_01_000002/cpu.shares | |
$ cat /cgroup/cpu/hadoop-yarn/container_1371055675984_0001_01_000002/cpu.shares | |
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Random rand = new Random(); | |
while(true) { | |
Integer.toString(random.nextInt()).hashCode(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bin/yarn resourcemanager | |
$ bin/yarn nodemanager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property> | |
<description>Ratio between virtual memory to physical memory when | |
setting memory limits for containers. Container allocations are | |
expressed in terms of physical memory, and virtual memory usage | |
is allowed to exceed this allocation by this ratio. | |
</description> | |
<name>yarn.nodemanager.vmem-pmem-ratio</name> | |
<value>8</value> | |
</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-06-11 10:17:10,465 FATAL [main] nodemanager.NodeManager (NodeManager.java:initAndStartNodeManager(324)) - Error starting NodeManager | |
org.apache.hadoop.yarn.YarnException: Failed to initialize container executor | |
at org.apache.hadoop.yarn.server.nodemanager.NodeManager.init(NodeManager.java:144) | |
at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:321) | |
at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:359) | |
Caused by: java.io.IOException: Linux container executor not configured properly (error=24) | |
at org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor.init(LinuxContainerExecutor.java:135) | |
at org.apache.hadoop.yarn.server.nodemanager.NodeManager.init(NodeManager.java:142) | |
... 2 more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property> | |
<description>who will execute(launch) the containers.</description> | |
<name>yarn.nodemanager.container-executor.class</name> | |
<value>org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor</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>org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler</value> | |
</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir /cgroup/cpu | |
$ ls -l /cgroup/ | |
total 0 | |
drwxr-xr-x 3 root root 0 Jun 11 13:01 cpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ yum install libcgroup |