CapacitySchedulerHealthInfo(CapacityScheduler cs) { SchedulerHealth ht = cs.getSchedulerHealth(); lastrun = ht.getLastSchedulerRunTime(); operationsInfo = new ArrayList<>(); operationsInfo.add(new OperationInformation("last-allocation", ht.getLastAllocationDetails())); operationsInfo.add( new OperationInformation("last-release", ht.getLastReleaseDetails())); operationsInfo.add(new OperationInformation("last-preemption", ht.getLastPreemptionDetails())); operationsInfo.add(new OperationInformation("last-reservation", ht.getLastReservationDetails())); lastRunDetails = new ArrayList<>(); lastRunDetails.add(new LastRunDetails("releases", ht.getReleaseCount(), ht .getResourcesReleased())); lastRunDetails.add(new LastRunDetails("allocations", ht .getAllocationCount(), ht.getResourcesAllocated())); lastRunDetails.add(new LastRunDetails("reservations", ht .getReservationCount(), ht.getResourcesReserved())); } }
+ healthInfo.getResourcesReleased().toString()).__().__().__(); Map<String, SchedulerHealth.DetailedInformation> info = new HashMap<>(); info.put("Allocation", healthInfo.getLastAllocationDetails()); info.put("Reservation", healthInfo.getLastReservationDetails()); info.put("Release", healthInfo.getLastReleaseDetails());
sh.getResourcesAllocated()); Assert.assertEquals(2, sh.getAggregateAllocationCount().longValue()); Assert.assertEquals("host_0:1234", sh.getLastAllocationDetails() .getNodeId().toString()); Assert.assertEquals("root.default", sh.getLastAllocationDetails() .getQueue()); sh.getResourcesAllocated()); Assert.assertEquals(3, sh.getAggregateAllocationCount().longValue()); Assert.assertEquals("host_0:1234", sh.getLastAllocationDetails() .getNodeId().toString()); Assert.assertEquals("root.default", sh.getLastAllocationDetails() .getQueue());
sh.getResourcesAllocated()); Assert.assertEquals(1, sh.getAggregateAllocationCount().longValue()); Assert.assertEquals("host_0:1234", sh.getLastAllocationDetails() .getNodeId().toString()); Assert.assertEquals("root.default", sh.getLastAllocationDetails() .getQueue()); sh.getResourcesReserved()); Assert.assertEquals(1, sh.getAggregateAllocationCount().longValue()); Assert.assertEquals("host_0:1234", sh.getLastAllocationDetails() .getNodeId().toString()); Assert.assertEquals("root.default", sh.getLastAllocationDetails() .getQueue());
"testqueue2"); Assert.assertEquals("container_1427562107907_0004_01_000001", sh .getLastAllocationDetails().getContainerId().toString()); Assert.assertEquals("testhost2:1234", sh.getLastAllocationDetails() .getNodeId().toString()); Assert.assertEquals("testqueue2", sh.getLastAllocationDetails().getQueue()); Assert.assertEquals(now, sh.getLastAllocationDetails().getTimestamp()); Assert.assertEquals(0, sh.getLastSchedulerRunTime());