Class CpusetCore
- java.lang.Object
-
- org.apache.storm.container.cgroup.core.CpusetCore
-
- All Implemented Interfaces:
CgroupCore
public class CpusetCore extends Object implements CgroupCore
-
-
Field Summary
Fields Modifier and Type Field Description static StringCPUSET_CPU_EXCLUSIVEstatic StringCPUSET_CPUSstatic StringCPUSET_MEM_EXCLUSIVEstatic StringCPUSET_MEM_HARDWALLstatic StringCPUSET_MEMORY_MIGRATEstatic StringCPUSET_MEMORY_PRESSUREstatic StringCPUSET_MEMORY_PRESSURE_ENABLEDstatic StringCPUSET_MEMORY_SPREAD_PAGEstatic StringCPUSET_MEMORY_SPREAD_SLABstatic StringCPUSET_MEMSstatic StringCPUSET_SCHED_LOAD_BALANCEstatic StringCPUSET_SCHED_RELAX_DOMAIN_LEVEL
-
Constructor Summary
Constructors Constructor Description CpusetCore(String dir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]getCpus()intgetMemPressure()int[]getMems()intgetSchedRelaxDomainLevel()SubSystemTypegetType()booleanisCpuExclusive()booleanisMemExclusive()booleanisMemHardwall()booleanisMemMigrate()booleanisMemPressureEnabled()booleanisMemSpreadPage()booleanisMemSpreadSlab()booleanisSchedLoadBlance()static int[]parseNums(String outputStr)voidsetCpuExclusive(boolean flag)voidsetCpus(int[] nums)voidsetMemExclusive(boolean flag)voidsetMemHardwall(boolean flag)voidsetMemMigrate(boolean flag)voidsetMemPressureEnabled(boolean flag)voidsetMems(int[] nums)voidsetMemSpreadPage(boolean flag)voidsetMemSpreadSlab(boolean flag)voidsetSchedLoadBlance(boolean flag)voidsetSchedRelaxDomainLevel(int value)
-
-
-
Field Detail
-
CPUSET_CPUS
public static final String CPUSET_CPUS
- See Also:
- Constant Field Values
-
CPUSET_MEMS
public static final String CPUSET_MEMS
- See Also:
- Constant Field Values
-
CPUSET_MEMORY_MIGRATE
public static final String CPUSET_MEMORY_MIGRATE
- See Also:
- Constant Field Values
-
CPUSET_CPU_EXCLUSIVE
public static final String CPUSET_CPU_EXCLUSIVE
- See Also:
- Constant Field Values
-
CPUSET_MEM_EXCLUSIVE
public static final String CPUSET_MEM_EXCLUSIVE
- See Also:
- Constant Field Values
-
CPUSET_MEM_HARDWALL
public static final String CPUSET_MEM_HARDWALL
- See Also:
- Constant Field Values
-
CPUSET_MEMORY_PRESSURE
public static final String CPUSET_MEMORY_PRESSURE
- See Also:
- Constant Field Values
-
CPUSET_MEMORY_PRESSURE_ENABLED
public static final String CPUSET_MEMORY_PRESSURE_ENABLED
- See Also:
- Constant Field Values
-
CPUSET_MEMORY_SPREAD_PAGE
public static final String CPUSET_MEMORY_SPREAD_PAGE
- See Also:
- Constant Field Values
-
CPUSET_MEMORY_SPREAD_SLAB
public static final String CPUSET_MEMORY_SPREAD_SLAB
- See Also:
- Constant Field Values
-
CPUSET_SCHED_LOAD_BALANCE
public static final String CPUSET_SCHED_LOAD_BALANCE
- See Also:
- Constant Field Values
-
CPUSET_SCHED_RELAX_DOMAIN_LEVEL
public static final String CPUSET_SCHED_RELAX_DOMAIN_LEVEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CpusetCore
public CpusetCore(String dir)
-
-
Method Detail
-
parseNums
public static int[] parseNums(String outputStr)
-
getType
public SubSystemType getType()
- Specified by:
getTypein interfaceCgroupCore
-
getCpus
public int[] getCpus() throws IOException- Throws:
IOException
-
setCpus
public void setCpus(int[] nums) throws IOException- Throws:
IOException
-
getMems
public int[] getMems() throws IOException- Throws:
IOException
-
setMems
public void setMems(int[] nums) throws IOException- Throws:
IOException
-
isMemMigrate
public boolean isMemMigrate() throws IOException- Throws:
IOException
-
setMemMigrate
public void setMemMigrate(boolean flag) throws IOException- Throws:
IOException
-
isCpuExclusive
public boolean isCpuExclusive() throws IOException- Throws:
IOException
-
setCpuExclusive
public void setCpuExclusive(boolean flag) throws IOException- Throws:
IOException
-
isMemExclusive
public boolean isMemExclusive() throws IOException- Throws:
IOException
-
setMemExclusive
public void setMemExclusive(boolean flag) throws IOException- Throws:
IOException
-
isMemHardwall
public boolean isMemHardwall() throws IOException- Throws:
IOException
-
setMemHardwall
public void setMemHardwall(boolean flag) throws IOException- Throws:
IOException
-
getMemPressure
public int getMemPressure() throws IOException- Throws:
IOException
-
isMemPressureEnabled
public boolean isMemPressureEnabled() throws IOException- Throws:
IOException
-
setMemPressureEnabled
public void setMemPressureEnabled(boolean flag) throws IOException- Throws:
IOException
-
isMemSpreadPage
public boolean isMemSpreadPage() throws IOException- Throws:
IOException
-
setMemSpreadPage
public void setMemSpreadPage(boolean flag) throws IOException- Throws:
IOException
-
isMemSpreadSlab
public boolean isMemSpreadSlab() throws IOException- Throws:
IOException
-
setMemSpreadSlab
public void setMemSpreadSlab(boolean flag) throws IOException- Throws:
IOException
-
isSchedLoadBlance
public boolean isSchedLoadBlance() throws IOException- Throws:
IOException
-
setSchedLoadBlance
public void setSchedLoadBlance(boolean flag) throws IOException- Throws:
IOException
-
getSchedRelaxDomainLevel
public int getSchedRelaxDomainLevel() throws IOException- Throws:
IOException
-
setSchedRelaxDomainLevel
public void setSchedRelaxDomainLevel(int value) throws IOException- Throws:
IOException
-
-