Class CentralizedOpportunisticContainerAllocator
java.lang.Object
org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator
org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.CentralizedOpportunisticContainerAllocator
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator
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 Summary
ConstructorsConstructorDescriptionCentralizedOpportunisticContainerAllocator(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. -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.hadoop.yarn.api.records.Container>allocateContainers(org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest blackList, 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, String appSubmitter) Methods inherited from class org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator
createContainer, getMaxAllocationsPerAMHeartbeat, getRemoteNodePartition, getRequestPartition, getTotalAllocations, matchAllocation, partitionAskList, setMaxAllocationsPerAMHeartbeat, updateBlacklist
-
Constructor Details
-
CentralizedOpportunisticContainerAllocator
public CentralizedOpportunisticContainerAllocator(org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager tokenSecretManager) Create a new Centralized Opportunistic Container Allocator.- Parameters:
tokenSecretManager- TokenSecretManager
-
CentralizedOpportunisticContainerAllocator
public CentralizedOpportunisticContainerAllocator(org.apache.hadoop.yarn.server.security.BaseContainerTokenSecretManager tokenSecretManager, int maxAllocationsPerAMHeartbeat, NodeQueueLoadMonitor nodeQueueLoadMonitor) Create a new Centralized Opportunistic Container Allocator.- Parameters:
tokenSecretManager- TokenSecretManagermaxAllocationsPerAMHeartbeat- max number of containers to be allocated in one AM heartbeatnodeQueueLoadMonitor- NodeQueueLoadMonitor.
-
-
Method Details
-
allocateContainers
public List<org.apache.hadoop.yarn.api.records.Container> allocateContainers(org.apache.hadoop.yarn.api.records.ResourceBlacklistRequest blackList, 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, String appSubmitter) throws org.apache.hadoop.yarn.exceptions.YarnException - Specified by:
allocateContainersin classorg.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-