Examples of CgroupCore


Examples of com.alibaba.jstorm.container.cgroup.core.CgroupCore

  public String startNewWorker(int cpuNum, String workerId)
      throws SecurityException, IOException {
    CgroupCommon workerGroup = new CgroupCommon(workerId, h,
        this.rootCgroup);
    this.center.create(workerGroup);
    CgroupCore cpu = workerGroup.getCores().get(SubSystemType.cpu);
    CpuCore cpuCore = (CpuCore) cpu;
    cpuCore.setCpuShares(cpuNum * ONE_CPU_SLOT);
    StringBuilder sb = new StringBuilder();
    sb.append("cgexec -g cpu:").append(workerGroup.getName()).append(" ");
    return sb.toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.