Class RegularContainerAllocator
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.allocator.AbstractContainerAllocator
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.allocator.RegularContainerAllocator
Allocate normal (new) containers, considers locality/label, etc. Using
delayed scheduling mechanism to get better locality allocation.
-
Constructor Summary
ConstructorsConstructorDescriptionRegularContainerAllocator(FiCaSchedulerApp application, org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, RMContext rmContext, ActivitiesManager activitiesManager) -
Method Summary
Modifier and TypeMethodDescriptionassignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource, CandidateNodeSet<FiCaSchedulerNode> candidates, SchedulingMode schedulingMode, ResourceLimits resourceLimits, RMContainer reservedContainer) allocate needs to handle following stuffs: Select request: Select a request to allocate.floatgetLocalityWaitFactor(int uniqAsks, int clusterNodes) Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.allocator.AbstractContainerAllocator
getCSAssignmentFromAllocateResult
-
Constructor Details
-
RegularContainerAllocator
public RegularContainerAllocator(FiCaSchedulerApp application, org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, RMContext rmContext, ActivitiesManager activitiesManager)
-
-
Method Details
-
getLocalityWaitFactor
public float getLocalityWaitFactor(int uniqAsks, int clusterNodes) -
assignContainers
public CSAssignment assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource, CandidateNodeSet<FiCaSchedulerNode> candidates, SchedulingMode schedulingMode, ResourceLimits resourceLimits, RMContainer reservedContainer) Description copied from class:AbstractContainerAllocatorallocate needs to handle following stuffs:- Select request: Select a request to allocate. E.g. select a resource request based on requirement/priority/locality.
- Check if a given resource can be allocated based on resource availability
- Do allocation: this will decide/create allocated/reserved container, this will also update metrics
- Specified by:
assignContainersin classAbstractContainerAllocator- Parameters:
clusterResource- clusterResourcecandidates- CandidateNodeSetschedulingMode- scheduling mode (exclusive or nonexclusive)resourceLimits- resourceLimitsreservedContainer- reservedContainer- Returns:
- CSAssignment proposal
-