Examples of IHostAttributes


Examples of org.apache.aurora.scheduler.storage.entities.IHostAttributes

    ITaskConfig threePortTask = ITaskConfig.build(makeTask(DEFAULT_CPUS, DEFAULT_RAM, DEFAULT_DISK)
        .newBuilder()
        .setRequestedPorts(ImmutableSet.of("one", "two", "three")));

    Set<Veto> none = ImmutableSet.of();
    IHostAttributes hostA = hostAttributes(HOST_A, host(HOST_A), rack(RACK_A));
    assertEquals(none,
        defaultFilter.filter(twoPorts, hostA, noPortTask, TASK_ID, emptyJob));
    assertEquals(none,
        defaultFilter.filter(twoPorts, hostA, onePortTask, TASK_ID, emptyJob));
    assertEquals(none,
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.IHostAttributes

  @Test
  public void testInsufficientResources() {
    control.replay();

    IHostAttributes hostA = hostAttributes(HOST_A, host(HOST_A), rack(RACK_A));
    assertVetoes(
        makeTask(DEFAULT_CPUS + 1, DEFAULT_RAM + 1, DEFAULT_DISK + 1),
        hostA,
        CPU.veto(1), DISK.veto(1), RAM.veto(1));
    assertVetoes(makeTask(DEFAULT_CPUS + 1, DEFAULT_RAM, DEFAULT_DISK), hostA, CPU.veto(1));
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.IHostAttributes

  @Test
  public void testDedicatedRole() {
    control.replay();

    IHostAttributes hostA = hostAttributes(HOST_A, dedicated(ROLE_A));
    checkConstraint(hostA, DEDICATED_ATTRIBUTE, true, ROLE_A);
    assertVetoes(makeTask(OWNER_B, JOB_B), hostA, DEDICATED_HOST_VETO);
  }
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.IHostAttributes

  public void testSharedDedicatedHost() {
    control.replay();

    String dedicated1 = "userA/jobA";
    String dedicated2 = "kestrel/kestrel";
    IHostAttributes hostA = hostAttributes(HOST_A, dedicated(dedicated1, dedicated2));
    assertNoVetoes(
        checkConstraint(
            new Identity().setRole("userA"),
            "jobA",
            hostA,
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.