Class CgroupUtils
- java.lang.Object
-
- org.apache.storm.container.cgroup.CgroupUtils
-
public class CgroupUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
CGROUP_STATUS_FILE
static String
MOUNT_STATUS_FILE
-
Constructor Summary
Constructors Constructor Description CgroupUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
deleteDir(String dir)
static boolean
enabled()
static String
getDir(String dir, String constant)
static Set<SubSystemType>
getSubSystemsFromString(String str)
Get a set of SubSystemType objects from a comma delimited list of subsystem names.static List<String>
readFileByLine(String filePath)
static String
subSystemsToString(Set<SubSystemType> subSystems)
Get a string that is a comma delimited list of subsystems.static void
writeFileByLine(String filePath, String lineToWrite)
static void
writeFileByLine(String filePath, List<String> linesToWrite)
-
-
-
Field Detail
-
CGROUP_STATUS_FILE
public static final String CGROUP_STATUS_FILE
- See Also:
- Constant Field Values
-
MOUNT_STATUS_FILE
public static final String MOUNT_STATUS_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
deleteDir
public static void deleteDir(String dir)
-
getSubSystemsFromString
public static Set<SubSystemType> getSubSystemsFromString(String str)
Get a set of SubSystemType objects from a comma delimited list of subsystem names.
-
subSystemsToString
public static String subSystemsToString(Set<SubSystemType> subSystems)
Get a string that is a comma delimited list of subsystems.
-
enabled
public static boolean enabled()
-
readFileByLine
public static List<String> readFileByLine(String filePath) throws IOException
- Throws:
IOException
-
writeFileByLine
public static void writeFileByLine(String filePath, List<String> linesToWrite) throws IOException
- Throws:
IOException
-
writeFileByLine
public static void writeFileByLine(String filePath, String lineToWrite) throws IOException
- Throws:
IOException
-
-