Examples of AllocateCountInfo


Examples of org.springframework.yarn.am.allocate.DefaultAllocateCountTracker.AllocateCountInfo

  public void testOneAny() {
    DefaultAllocateCountTracker tracker = new DefaultAllocateCountTracker(new Configuration());
    ContainerAllocateData containerAllocateData = new ContainerAllocateData();
    containerAllocateData.addAny(1);
    tracker.addContainers(containerAllocateData);
    AllocateCountInfo allocateCounts = tracker.getAllocateCounts();
    assertThat(allocateCounts, notNullValue());
    assertThat(allocateCounts.anysInfo.size(), is(1));
    assertThat(allocateCounts.anysInfo.get("*"), is(1));
    assertThat(allocateCounts.hostsInfo.size(), is(0));
    assertThat(allocateCounts.racksInfo.size(), is(0));
View Full Code Here

Examples of org.springframework.yarn.am.allocate.DefaultAllocateCountTracker.AllocateCountInfo

  public void testOneHost() {
    DefaultAllocateCountTracker tracker = new DefaultAllocateCountTracker(new Configuration());
    ContainerAllocateData containerAllocateData = new ContainerAllocateData();
    containerAllocateData.addHosts("host1", 1);
    tracker.addContainers(containerAllocateData);
    AllocateCountInfo allocateCounts = tracker.getAllocateCounts();
    assertThat(allocateCounts, notNullValue());
    assertThat(allocateCounts.anysInfo.size(), is(1));
    assertThat(allocateCounts.anysInfo.get("*"), is(2));
    assertThat(allocateCounts.hostsInfo.size(), is(1));
    assertThat(allocateCounts.hostsInfo.get("host1"), is(1));
View Full Code Here

Examples of org.springframework.yarn.am.allocate.DefaultAllocateCountTracker.AllocateCountInfo

  public void testOneRack() {
    DefaultAllocateCountTracker tracker = new DefaultAllocateCountTracker(new Configuration());
    ContainerAllocateData containerAllocateData = new ContainerAllocateData();
    containerAllocateData.addRacks("/default-rack", 1);
    tracker.addContainers(containerAllocateData);
    AllocateCountInfo allocateCounts = tracker.getAllocateCounts();
    assertThat(allocateCounts, notNullValue());
    assertThat(allocateCounts.anysInfo.size(), is(1));
    assertThat(allocateCounts.anysInfo.get("*"), is(1));
    assertThat(allocateCounts.hostsInfo.size(), is(0));
    assertThat(allocateCounts.racksInfo.size(), is(1));
View Full Code Here

Examples of org.springframework.yarn.am.allocate.DefaultAllocateCountTracker.AllocateCountInfo

    DefaultAllocateCountTracker tracker = new DefaultAllocateCountTracker(new Configuration());
    ContainerAllocateData containerAllocateData = new ContainerAllocateData();
    containerAllocateData.addHosts("host1", 1);
    containerAllocateData.addRacks("/default-rack", 1);
    tracker.addContainers(containerAllocateData);
    AllocateCountInfo allocateCounts = tracker.getAllocateCounts();
    assertThat(allocateCounts, notNullValue());
    assertThat(allocateCounts.anysInfo.size(), is(1));
    assertThat(allocateCounts.anysInfo.get("*"), is(2));
    assertThat(allocateCounts.hostsInfo.size(), is(1));
    assertThat(allocateCounts.hostsInfo.get("host1"), is(1));
View Full Code Here

Examples of org.springframework.yarn.am.allocate.DefaultAllocateCountTracker.AllocateCountInfo

    private List<ResourceRequest> createRequests() {
        List<ResourceRequest> requestedContainers = new ArrayList<ResourceRequest>();

        for (DefaultAllocateCountTracker tracker : allocateCountTrackers.values()) {
          AllocateCountInfo allocateCounts = tracker.getAllocateCounts();
          ContainerAllocationValues allocationValues = getAllocationValues(tracker.getId());
          if (log.isTraceEnabled()) {
          log.trace("trace 1 " + allocationValues.locality);
          log.trace("trace 2 tracker id:" + tracker.getId());
          }
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.