description "cgroup configurations for YARN"
 
start on started cgroup-lite
#start on mounted MOUNTPOINT=/sys/fs/cgroup
 
script
	for subsys in cpu; do
		HIERARCHY_PATH=/sys/fs/cgroup/${subsys}/<%= node['hadoop']['yarn.nodemanager.linux-container-executor.cgroups.hierarchy'].gsub(/^\//, '') %>
		if [ ! -d $HIERARCHY_PATH ]; then
			mkdir $HIERARCHY_PATH
			chown -R yarn:yarn $HIERARCHY_PATH
		fi
	done
end script
