public class OpportunisticContainerAllocator extends Object
The OpportunisticContainerAllocator 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.
| Modifier and Type | Class and Description |
|---|---|
static class |
OpportunisticContainerAllocator.AllocationParams
This class encapsulates application specific parameters used to build a
Container.
|
static class |
OpportunisticContainerAllocator.ContainerIdGenerator
A Container Id Generator.
|
static class |
OpportunisticContainerAllocator.PartitionedResourceRequests
Class that includes two lists of
ResourceRequests: one for
GUARANTEED and one for OPPORTUNISTIC ResourceRequests. |
| Constructor and Description |
|---|
OpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager)
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.
|
OpportunisticContainerAllocator.PartitionedResourceRequests |
partitionAskList(List<org.apache.hadoop.yarn.api.records.ResourceRequest> askList)
Partitions a list of ResourceRequest to two separate lists, one for
GUARANTEED and one for OPPORTUNISTIC ResourceRequests.
|
public OpportunisticContainerAllocator(BaseContainerTokenSecretManager tokenSecretManager)
tokenSecretManager - TokenSecretManagerpublic 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
blackList - Resource BlackList RequestoppResourceReqs - Opportunistic Resource RequestsapplicationAttemptId - ApplicationAttemptIdopportContext - App specific OpportunisticContainerContextrmIdentifier - RM IdentifierappSubmitter - App Submitterorg.apache.hadoop.yarn.exceptions.YarnException - YarnExceptionpublic OpportunisticContainerAllocator.PartitionedResourceRequests partitionAskList(List<org.apache.hadoop.yarn.api.records.ResourceRequest> askList)
askList - the list of ResourceRequests to be partitionedCopyright © 2022 Apache Software Foundation. All rights reserved.