public class CentralizedOpportunisticContainerAllocator
extends org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator
The CentralizedOpportunisticContainerAllocator allocates opportunistic containers by considering all the nodes present in the cluster, after modifying the container sizes to respect the limits set by the ResourceManager. It tries to distribute the containers as evenly as possible.
org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.Allocation, org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.AllocationParams, org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.ContainerIdGenerator, org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.EnrichedResourceRequest, org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.PartitionedResourceRequests| Constructor | Description |
|---|---|
CentralizedOpportunisticContainerAllocator(org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager tokenSecretManager) |
Create a new Centralized Opportunistic Container Allocator.
|
CentralizedOpportunisticContainerAllocator(org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager tokenSecretManager,
int maxAllocationsPerAMHeartbeat,
NodeQueueLoadMonitor nodeQueueLoadMonitor) |
Create a new Centralized 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,
org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerContext opportContext,
long rmIdentifier,
java.lang.String appSubmitter) |
createContainer, getMaxAllocationsPerAMHeartbeat, getRemoteNodePartition, getRequestPartition, getTotalAllocations, matchAllocation, partitionAskList, setMaxAllocationsPerAMHeartbeat, updateBlacklistpublic CentralizedOpportunisticContainerAllocator(org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager tokenSecretManager)
tokenSecretManager - TokenSecretManagerpublic CentralizedOpportunisticContainerAllocator(org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager tokenSecretManager,
int maxAllocationsPerAMHeartbeat,
NodeQueueLoadMonitor nodeQueueLoadMonitor)
tokenSecretManager - TokenSecretManagermaxAllocationsPerAMHeartbeat - max number of containers to be
allocated in one AM heartbeatnodeQueueLoadMonitor - NodeQueueLoadMonitor.public 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,
org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerContext opportContext,
long rmIdentifier,
java.lang.String appSubmitter)
throws org.apache.hadoop.yarn.exceptions.YarnException
allocateContainers in class org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocatororg.apache.hadoop.yarn.exceptions.YarnExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.