Class CgroupCommon
java.lang.Object
org.apache.storm.container.cgroup.CgroupCommon
- All Implemented Interfaces:
CgroupCommonOperation
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCgroupCommon
(String name, Hierarchy hierarchy, CgroupCommon parent) CgroupCommon
(Hierarchy hierarchy, String dir) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProcs
(int pid) add a process to cgroup.void
addTask
(int taskId) add task to cgroup.void
delete()
boolean
boolean
get the cgroup.clone_children config.getCores()
getDir()
getName()
boolean
to 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.int
hashCode()
boolean
isRoot()
void
setCgroupCloneChildren
(boolean flag) Set the cgroup.clone_children config.void
setEventControl
(String eventFd, String controlFd, String... args) set event control config.void
setNotifyOnRelease
(boolean flag) to set notify_on_release config in cgroup.void
setReleaseAgent
(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:CgroupCommonOperation
add task to cgroup.- Specified by:
addTask
in interfaceCgroupCommonOperation
- Parameters:
taskId
- task id of task to add- Throws:
IOException
-
getTasks
Description copied from interface:CgroupCommonOperation
Get a list of task ids running in CGroup.- Specified by:
getTasks
in interfaceCgroupCommonOperation
- Throws:
IOException
-
addProcs
Description copied from interface:CgroupCommonOperation
add a process to cgroup.- Specified by:
addProcs
in interfaceCgroupCommonOperation
- Parameters:
pid
- the PID of the process to add- Throws:
IOException
-
getPids
Description copied from interface:CgroupCommonOperation
get the PIDs of processes running in cgroup.- Specified by:
getPids
in interfaceCgroupCommonOperation
- Throws:
IOException
-
getNotifyOnRelease
Description copied from interface:CgroupCommonOperation
to get the notify_on_release config.- Specified by:
getNotifyOnRelease
in interfaceCgroupCommonOperation
- Throws:
IOException
-
setNotifyOnRelease
Description copied from interface:CgroupCommonOperation
to set notify_on_release config in cgroup.- Specified by:
setNotifyOnRelease
in interfaceCgroupCommonOperation
- Throws:
IOException
-
getReleaseAgent
Description copied from interface:CgroupCommonOperation
get the command for the relase agent to execute.- Specified by:
getReleaseAgent
in interfaceCgroupCommonOperation
- Throws:
IOException
-
setReleaseAgent
Description copied from interface:CgroupCommonOperation
set a command for the release agent to execute.- Specified by:
setReleaseAgent
in interfaceCgroupCommonOperation
- Throws:
IOException
-
getCgroupCloneChildren
Description copied from interface:CgroupCommonOperation
get the cgroup.clone_children config.- Specified by:
getCgroupCloneChildren
in interfaceCgroupCommonOperation
- Throws:
IOException
-
setCgroupCloneChildren
Description copied from interface:CgroupCommonOperation
Set the cgroup.clone_children config.- Specified by:
setCgroupCloneChildren
in interfaceCgroupCommonOperation
- Throws:
IOException
-
setEventControl
Description copied from interface:CgroupCommonOperation
set event control config.- Specified by:
setEventControl
in interfaceCgroupCommonOperation
- Throws:
IOException
-
getHierarchy
-
getName
-
getDir
-
getParent
-
getChildren
-
isRoot
public boolean isRoot() -
getCores
-
delete
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-