Map<String, String> containerShellEnv = new ConcurrentHashMap<>(containerEnv); TonyTask task = session.getAndInitMatchingTask(container.getAllocationRequestId());
if (schedReq.getPriority().equals(container.getPriority()) && schedReq.getAllocationRequestId() == container .getAllocationRequestId()) { int numAllocations = schedReq.getResourceSizing().getNumAllocations();
allocatedContainer.getAllocationRequestId()); if (requests.iterator().hasNext()) { AMRMClient.ContainerRequest request = requests.iterator().next();
/** * Add the container to outstanding decreases. * @param updateReq UpdateContainerRequest. * @param schedulerNode SchedulerNode. * @param container Container. * @return If it was possible to decrease the container. */ public synchronized boolean checkAndAddToOutstandingDecreases( UpdateContainerRequest updateReq, SchedulerNode schedulerNode, Container container) { if (outstandingDecreases.containsKey(container.getId())) { return false; } if (ContainerUpdateType.DECREASE_RESOURCE == updateReq.getContainerUpdateType()) { SchedulerRequestKey updateKey = new SchedulerRequestKey (container.getPriority(), container.getAllocationRequestId(), container.getId()); cancelPreviousRequest(schedulerNode, updateKey); outstandingDecreases.put(container.getId(), updateReq.getCapability()); } else { outstandingDecreases.put(container.getId(), container.getResource()); } return true; }
private void checkAllocatedContainer(Container allocated, int memory, NodeId nodeId, long allocationRequestId) { Assert.assertEquals(memory, allocated.getResource().getMemorySize()); Assert.assertEquals(nodeId, allocated.getNodeId()); Assert.assertEquals(allocationRequestId, allocated.getAllocationRequestId()); }
.filter(container -> container.getAllocationRequestId() == 1l) .collect(Collectors.toSet()); Assert.assertNotNull(containers);
allocatedContainers.get(0).getAllocationRequestId(), ResourceRequest.ANY, Resources.createResource(3 * GB), 0, true,
this.logAggregationContext, rmContainer.getNodeLabelExpression(), containerType, container.getExecutionType(), container.getAllocationRequestId(), rmContainer.getAllocationTags())); container.setAllocationTags(rmContainer.getAllocationTags());
tempContainer.getExecutionType()); newContainer.setAllocationRequestId( existingRMContainer.getContainer().getAllocationRequestId()); newContainer.setVersion(existingRMContainer.getContainer().getVersion());