public class OpportunisticContainerContext extends Object
Constructor and Description |
---|
OpportunisticContainerContext() |
Modifier and Type | Method and Description |
---|---|
void |
addToOutstandingReqs(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceAsks)
Takes a list of ResourceRequests (asks), extracts the key information viz.
|
OpportunisticContainerAllocator.AllocationParams |
getAppParams() |
Set<String> |
getBlacklist() |
OpportunisticContainerAllocator.ContainerIdGenerator |
getContainerIdGenerator() |
Map<String,RemoteNode> |
getNodeMap() |
TreeMap<SchedulerRequestKey,Map<org.apache.hadoop.yarn.api.records.Resource,org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.EnrichedResourceRequest>> |
getOutstandingOpReqs() |
void |
matchAllocationToOutstandingRequest(org.apache.hadoop.yarn.api.records.Resource capability,
List<org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.Allocation> allocations)
This method matches a returned list of Container Allocations to any
outstanding OPPORTUNISTIC ResourceRequest.
|
void |
setContainerIdGenerator(OpportunisticContainerAllocator.ContainerIdGenerator containerIdGenerator) |
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) |
void |
updateNodeList(List<RemoteNode> newNodeList) |
public OpportunisticContainerAllocator.AllocationParams getAppParams()
public OpportunisticContainerAllocator.ContainerIdGenerator getContainerIdGenerator()
public void setContainerIdGenerator(OpportunisticContainerAllocator.ContainerIdGenerator containerIdGenerator)
public Map<String,RemoteNode> getNodeMap()
public void updateNodeList(List<RemoteNode> newNodeList)
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)
public TreeMap<SchedulerRequestKey,Map<org.apache.hadoop.yarn.api.records.Resource,org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.EnrichedResourceRequest>> getOutstandingOpReqs()
public void addToOutstandingReqs(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceAsks)
resourceAsks
- the list with the ResourceRequest
spublic void matchAllocationToOutstandingRequest(org.apache.hadoop.yarn.api.records.Resource capability, List<org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.Allocation> allocations)
capability
- Capabilityallocations
- Allocations.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.