public interface ResourceAllocationStrategy
Modifier and Type | Method and Description |
---|---|
ResourceAllocationResult |
tryFulfillRequirements(Map<JobID,Collection<ResourceRequirement>> missingResources,
org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerResourceInfoProvider taskManagerResourceInfoProvider,
BlockedTaskManagerChecker blockedTaskManagerChecker)
Try to make an allocation decision to fulfill the resource requirements.
|
ResourceReconcileResult |
tryReconcileClusterResources(org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerResourceInfoProvider taskManagerResourceInfoProvider)
Try to make a decision to reconcile the cluster resources.
|
ResourceAllocationResult tryFulfillRequirements(Map<JobID,Collection<ResourceRequirement>> missingResources, org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerResourceInfoProvider taskManagerResourceInfoProvider, BlockedTaskManagerChecker blockedTaskManagerChecker)
Notice: For performance considerations, modifications might be performed directly on the input arguments. If the arguments are reused elsewhere, please make a deep copy in advance.
missingResources
- resource requirements that are not yet fulfilled, indexed by jobIdtaskManagerResourceInfoProvider
- provide the registered/pending resources of the
current clusterblockedTaskManagerChecker
- blocked task manager checkerResourceAllocationResult
based on the current status, which contains
whether the requirements can be fulfilled and the actions to takeResourceReconcileResult tryReconcileClusterResources(org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerResourceInfoProvider taskManagerResourceInfoProvider)
tryFulfillRequirements(java.util.Map<org.apache.flink.api.common.JobID, java.util.Collection<org.apache.flink.runtime.slots.ResourceRequirement>>, org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerResourceInfoProvider, org.apache.flink.runtime.blocklist.BlockedTaskManagerChecker)
, only consider empty registered / pending workers and assume
all requirements are fulfilled by registered / pending workers.taskManagerResourceInfoProvider
- provide the registered/pending resources of the
current clusterResourceReconcileResult
based on the current status, which contains the
actions to takeCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.