From 2f1d29b02eb01e6eaf12df3b812de2cfa7b17979 Mon Sep 17 00:00:00 2001 From: "Timothy St. Clair" Date: Mon, 17 Feb 2014 13:53:38 -0600 Subject: [PATCH] Update to use hadoop group + add new systemd interface --- hadoop-hdfs.service.template | 21 +++++++++++++++++++-- hadoop-mapreduce.service.template | 21 +++++++++++++++++++-- hadoop-yarn.service.template | 21 +++++++++++++++++++-- 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/hadoop-hdfs.service.template b/hadoop-hdfs.service.template index 6b9c0c2..bca5c5f 100644 --- a/hadoop-hdfs.service.template +++ b/hadoop-hdfs.service.template @@ -10,11 +10,28 @@ EnvironmentFile=-/etc/sysconfig/hadoop-DAEMON ExecStart=/usr/sbin/hadoop-daemon.sh start DAEMON ExecStop=/usr/sbin/hadoop-daemon.sh stop DAEMON User=hdfs -Group=hdfs +Group=hadoop PIDFile=/var/run/hadoop-hdfs/hadoop-hdfs-DAEMON.pid LimitNOFILE=32768 LimitNPROC=65536 -#ControlGroup=cpu:/hadoop memory:/hadoop + +####################################### +# Note: Below are cgroup options +####################################### +#Slice= +#CPUAccounting=true +#CPUShares=1024 + +#MemoryAccounting=true +#TBD: MemoryLimit=bytes, MemorySoftLimit=bytes + +#BlockIOAccounting=true +#BlockIOWeight=?? +#BlockIODeviceWeight=?? +#TBD: BlockIOReadBandwidth=bytes, BlockIOWriteBandwidth=bytes + +#DeviceAllow= +#DevicePolicy=auto|closed|strict [Install] WantedBy=multi-user.target diff --git a/hadoop-mapreduce.service.template b/hadoop-mapreduce.service.template index c43511b..fb90804 100644 --- a/hadoop-mapreduce.service.template +++ b/hadoop-mapreduce.service.template @@ -10,11 +10,28 @@ EnvironmentFile=-/etc/sysconfig/hadoop-DAEMON ExecStart=/usr/sbin/mr-jobhistory-daemon.sh start DAEMON ExecStop=/usr/sbin/mr-jobhistory-daemon.sh stop DAEMON User=mapred -Group=mapred +Group=hadoop PIDFile=/var/run/hadoop-mapreduce/mapred-mapred-DAEMON.pid LimitNOFILE=32768 LimitNPROC=65536 -#ControlGroup=cpu:/hadoop memory:/hadoop + +####################################### +# Note: Below are cgroup options +####################################### +#Slice= +#CPUAccounting=true +#CPUShares=1024 + +#MemoryAccounting=true +#TBD: MemoryLimit=bytes, MemorySoftLimit=bytes + +#BlockIOAccounting=true +#BlockIOWeight=?? +#BlockIODeviceWeight=?? +#TBD: BlockIOReadBandwidth=bytes, BlockIOWriteBandwidth=bytes + +#DeviceAllow= +#DevicePolicy=auto|closed|strict [Install] WantedBy=multi-user.target diff --git a/hadoop-yarn.service.template b/hadoop-yarn.service.template index 47721ac..00e53f4 100644 --- a/hadoop-yarn.service.template +++ b/hadoop-yarn.service.template @@ -10,11 +10,28 @@ EnvironmentFile=-/etc/sysconfig/hadoop-DAEMON ExecStart=/usr/sbin/yarn-daemon.sh start DAEMON ExecStop=/usr/sbin/yarn-daemon.sh stop DAEMON User=yarn -Group=yarn +Group=hadoop PIDFile=/var/run/hadoop-yarn/yarn-yarn-DAEMON.pid LimitNOFILE=32768 LimitNPROC=65536 -#ControlGroup=cpu:/hadoop memory:/hadoop + +####################################### +# Note: Below are cgroup options +####################################### +#Slice= +#CPUAccounting=true +#CPUShares=1024 + +#MemoryAccounting=true +#TBD: MemoryLimit=bytes, MemorySoftLimit=bytes + +#BlockIOAccounting=true +#BlockIOWeight=?? +#BlockIODeviceWeight=?? +#TBD: BlockIOReadBandwidth=bytes, BlockIOWriteBandwidth=bytes + +#DeviceAllow= +#DevicePolicy=auto|closed|strict [Install] WantedBy=multi-user.target