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 and 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 and Description |
---|---|
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,
OpportunisticContainerContext opportContext,
long rmIdentifier,
String appSubmitter)
Allocate OPPORTUNISTIC containers.
|
createContainer, getMaxAllocationsPerAMHeartbeat, getRemoteNodePartition, getRequestPartition, getTotalAllocations, matchAllocation, partitionAskList, setMaxAllocationsPerAMHeartbeat, updateBlacklist
public DistributedOpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager)
tokenSecretManager
- TokenSecretManagerpublic DistributedOpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager, int maxAllocationsPerAMHeartbeat)
tokenSecretManager
- TokenSecretManagermaxAllocationsPerAMHeartbeat
- max number of containers to be
allocated in one AM heartbeatpublic 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, OpportunisticContainerContext opportContext, long rmIdentifier, String appSubmitter) throws org.apache.hadoop.yarn.exceptions.YarnException
OpportunisticContainerAllocator
allocateContainers
in class OpportunisticContainerAllocator
blackList
- Resource BlackList RequestoppResourceReqs
- Opportunistic Resource RequestsapplicationAttemptId
- ApplicationAttemptIdopportContext
- App specific OpportunisticContainerContextrmIdentifier
- RM IdentifierappSubmitter
- App Submitterorg.apache.hadoop.yarn.exceptions.YarnException
- YarnExceptionCopyright © 2008–2021 Apache Software Foundation. All rights reserved.