public class DistributedOpportunisticContainerAllocator extends OpportunisticContainerAllocator
The DistributedOpportunisticContainerAllocator allocates containers on a given list of nodes, after modifying the container sizes to respect the limits set by the ResourceManager. It tries to distribute the containers as evenly as possible.
OpportunisticContainerAllocator.Allocation, OpportunisticContainerAllocator.AllocationParams, OpportunisticContainerAllocator.ContainerIdGenerator, OpportunisticContainerAllocator.EnrichedResourceRequest, OpportunisticContainerAllocator.PartitionedResourceRequests| Constructor | Description |
|---|---|
DistributedOpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager) |
Create a new Opportunistic Container Allocator.
|
DistributedOpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager,
int maxAllocationsPerAMHeartbeat) |
Create a new Opportunistic Container Allocator.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<org.apache.hadoop.yarn.api.records.Container> |
allocateContainers(org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest blackList,
java.util.List<org.apache.hadoop.yarn.api.records.ResourceRequest> oppResourceReqs,
org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
OpportunisticContainerContext opportContext,
long rmIdentifier,
java.lang.String appSubmitter) |
Allocate OPPORTUNISTIC containers.
|
createContainer, getMaxAllocationsPerAMHeartbeat, getRemoteNodePartition, getRequestPartition, getTotalAllocations, matchAllocation, partitionAskList, setMaxAllocationsPerAMHeartbeat, updateBlacklistpublic DistributedOpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager)
tokenSecretManager - TokenSecretManagerpublic DistributedOpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager, int maxAllocationsPerAMHeartbeat)
tokenSecretManager - TokenSecretManagermaxAllocationsPerAMHeartbeat - max number of containers to be
allocated in one AM heartbeatpublic java.util.List<org.apache.hadoop.yarn.api.records.Container> allocateContainers(org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest blackList,
java.util.List<org.apache.hadoop.yarn.api.records.ResourceRequest> oppResourceReqs,
org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
OpportunisticContainerContext opportContext,
long rmIdentifier,
java.lang.String appSubmitter)
throws org.apache.hadoop.yarn.exceptions.YarnException
OpportunisticContainerAllocatorallocateContainers in class OpportunisticContainerAllocatorblackList - Resource BlackList RequestoppResourceReqs - Opportunistic Resource RequestsapplicationAttemptId - ApplicationAttemptIdopportContext - App specific OpportunisticContainerContextrmIdentifier - RM IdentifierappSubmitter - App Submitterorg.apache.hadoop.yarn.exceptions.YarnException - YarnExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.