Package com.spotify.helios.common.descriptors

Examples of com.spotify.helios.common.descriptors.Resources


    builder.cmd(job.getCommand());
    builder.env(containerEnvStrings());
    builder.exposedPorts(containerExposedPorts());
    builder.domainname(host);
    builder.volumes(volumes());
    final Resources resources = job.getResources();
    if (resources != null) {
      builder.memory(resources.getMemory());
      builder.memorySwap(resources.getMemorySwap());
      builder.cpuset(resources.getCpuset());
      builder.cpuShares(resources.getCpuShares());
    }
    containerDecorator.decorateContainerConfig(job, imageInfo, builder);
    return builder.build();
  }
View Full Code Here


    job = Job.newBuilder()
        .setName(testJobName)
        .setVersion(testJobVersion)
        .setImage(BUSYBOX)
        .setResources(new Resources(MEMORY, MEMORY_SWAP, CPU_SHARES, CPUSET))
        .setCommand(IDLE_COMMAND)
        .setCreatingUser(TEST_USER)
        .build();

    try (final DockerClient docker = getNewDockerClient()) {
View Full Code Here

TOP

Related Classes of com.spotify.helios.common.descriptors.Resources

Copyright © 2018 www.massapicom. 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.