Class OpportunisticContainerContext
java.lang.Object
org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerContext
This encapsulates application specific information used by the
Opportunistic Container Allocator to allocate containers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToOutstandingReqs(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceAsks) Takes a list of ResourceRequests (asks), extracts the key information viz.TreeMap<SchedulerRequestKey,Map<org.apache.hadoop.yarn.api.records.Resource, OpportunisticContainerAllocator.EnrichedResourceRequest>> voidmatchAllocationToOutstandingRequest(org.apache.hadoop.yarn.api.records.Resource capability, List<OpportunisticContainerAllocator.Allocation> allocations) This method matches a returned list of Container Allocations to any outstanding OPPORTUNISTIC ResourceRequest.voidsetContainerIdGenerator(OpportunisticContainerAllocator.ContainerIdGenerator containerIdGenerator) voidupdateAllocationParams(org.apache.hadoop.yarn.api.records.Resource minResource, org.apache.hadoop.yarn.api.records.Resource maxResource, org.apache.hadoop.yarn.api.records.Resource incrResource, int containerTokenExpiryInterval) voidupdateNodeList(List<RemoteNode> newNodeList)
-
Constructor Details
-
OpportunisticContainerContext
public OpportunisticContainerContext()
-
-
Method Details
-
getAppParams
-
getContainerIdGenerator
-
setContainerIdGenerator
public void setContainerIdGenerator(OpportunisticContainerAllocator.ContainerIdGenerator containerIdGenerator) -
getNodeMap
-
updateNodeList
-
updateAllocationParams
public void updateAllocationParams(org.apache.hadoop.yarn.api.records.Resource minResource, org.apache.hadoop.yarn.api.records.Resource maxResource, org.apache.hadoop.yarn.api.records.Resource incrResource, int containerTokenExpiryInterval) -
getBlacklist
-
getOutstandingOpReqs
public TreeMap<SchedulerRequestKey,Map<org.apache.hadoop.yarn.api.records.Resource, getOutstandingOpReqs()OpportunisticContainerAllocator.EnrichedResourceRequest>> -
addToOutstandingReqs
public void addToOutstandingReqs(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceAsks) Takes a list of ResourceRequests (asks), extracts the key information viz. (Priority, ResourceName, Capability) and adds to the outstanding OPPORTUNISTIC outstandingOpReqs map. The nested map is required to enforce the current YARN constraint that only a single ResourceRequest can exist at a give Priority and Capability.- Parameters:
resourceAsks- the list with theResourceRequests
-
matchAllocationToOutstandingRequest
public void matchAllocationToOutstandingRequest(org.apache.hadoop.yarn.api.records.Resource capability, List<OpportunisticContainerAllocator.Allocation> allocations) This method matches a returned list of Container Allocations to any outstanding OPPORTUNISTIC ResourceRequest.- Parameters:
capability- Capabilityallocations- Allocations.
-
getOppSchedulerMetrics
-