Class CgroupCommon
java.lang.Object
org.apache.storm.container.cgroup.CgroupCommon
- All Implemented Interfaces:
CgroupCommonOperation
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCgroupCommon(String name, Hierarchy hierarchy, CgroupCommon parent) CgroupCommon(Hierarchy hierarchy, String dir) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProcs(int pid) add a process to cgroup.voidaddTask(int taskId) add task to cgroup.voiddelete()booleanbooleanget the cgroup.clone_children config.getCores()getDir()getName()booleanto get the notify_on_release config.getPids()get the PIDs of processes running in cgroup.get the command for the relase agent to execute.getTasks()Get a list of task ids running in CGroup.inthashCode()booleanisRoot()voidsetCgroupCloneChildren(boolean flag) Set the cgroup.clone_children config.voidsetEventControl(String eventFd, String controlFd, String... args) set event control config.voidsetNotifyOnRelease(boolean flag) to set notify_on_release config in cgroup.voidsetReleaseAgent(String command) set a command for the release agent to execute.toString()
-
Field Details
-
TASKS
- See Also:
-
NOTIFY_ON_RELEASE
- See Also:
-
RELEASE_AGENT
- See Also:
-
CGROUP_CLONE_CHILDREN
- See Also:
-
CGROUP_EVENT_CONTROL
- See Also:
-
CGROUP_PROCS
- See Also:
-
-
Constructor Details
-
CgroupCommon
-
CgroupCommon
-
-
Method Details
-
addTask
Description copied from interface:CgroupCommonOperationadd task to cgroup.- Specified by:
addTaskin interfaceCgroupCommonOperation- Parameters:
taskId- task id of task to add- Throws:
IOException
-
getTasks
Description copied from interface:CgroupCommonOperationGet a list of task ids running in CGroup.- Specified by:
getTasksin interfaceCgroupCommonOperation- Throws:
IOException
-
addProcs
Description copied from interface:CgroupCommonOperationadd a process to cgroup.- Specified by:
addProcsin interfaceCgroupCommonOperation- Parameters:
pid- the PID of the process to add- Throws:
IOException
-
getPids
Description copied from interface:CgroupCommonOperationget the PIDs of processes running in cgroup.- Specified by:
getPidsin interfaceCgroupCommonOperation- Throws:
IOException
-
getNotifyOnRelease
Description copied from interface:CgroupCommonOperationto get the notify_on_release config.- Specified by:
getNotifyOnReleasein interfaceCgroupCommonOperation- Throws:
IOException
-
setNotifyOnRelease
Description copied from interface:CgroupCommonOperationto set notify_on_release config in cgroup.- Specified by:
setNotifyOnReleasein interfaceCgroupCommonOperation- Throws:
IOException
-
getReleaseAgent
Description copied from interface:CgroupCommonOperationget the command for the relase agent to execute.- Specified by:
getReleaseAgentin interfaceCgroupCommonOperation- Throws:
IOException
-
setReleaseAgent
Description copied from interface:CgroupCommonOperationset a command for the release agent to execute.- Specified by:
setReleaseAgentin interfaceCgroupCommonOperation- Throws:
IOException
-
getCgroupCloneChildren
Description copied from interface:CgroupCommonOperationget the cgroup.clone_children config.- Specified by:
getCgroupCloneChildrenin interfaceCgroupCommonOperation- Throws:
IOException
-
setCgroupCloneChildren
Description copied from interface:CgroupCommonOperationSet the cgroup.clone_children config.- Specified by:
setCgroupCloneChildrenin interfaceCgroupCommonOperation- Throws:
IOException
-
setEventControl
Description copied from interface:CgroupCommonOperationset event control config.- Specified by:
setEventControlin interfaceCgroupCommonOperation- Throws:
IOException
-
getHierarchy
-
getName
-
getDir
-
getParent
-
getChildren
-
isRoot
public boolean isRoot() -
getCores
-
delete
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-