Examples of addToConstraints()


Examples of org.apache.aurora.gen.TaskConfig.addToConstraints()

    expectAuth(ROLE, true);

    control.replay();

    TaskConfig task = nonProductionTask();
    task.addToConstraints(dedicatedConstraint(ImmutableSet.of("mesos", "test")));
    assertResponse(INVALID_REQUEST, thrift.createJob(makeJob(task), DEFAULT_LOCK, SESSION));
  }

  private IScheduledTask buildScheduledTask(int instanceId, long ramMb) {
    return IScheduledTask.build(new ScheduledTask()
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig.addToConstraints()

        .setRamMb(ramMb)
        .setDiskMb(diskMb)
        .setProduction(production);

    if (dedicated.isPresent()) {
      task.addToConstraints(new Constraint(
          ConfigurationManager.DEDICATED_ATTRIBUTE,
          TaskConstraint.value(new ValueConstraint(false, ImmutableSet.of(dedicated.get())))));
    }

    return IScheduledTask.build(new ScheduledTask()
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.