public class DefaultResourceTracker extends Object implements ResourceTracker
ResourceTracker implementation.| Constructor and Description |
|---|
DefaultResourceTracker() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all state from the tracker.
|
Collection<ResourceRequirement> |
getAcquiredResources(org.apache.flink.api.common.JobID jobId)
Returns a collection of
ResourceRequirements that describe which resources have been
assigned to a job. |
Map<org.apache.flink.api.common.JobID,Collection<ResourceRequirement>> |
getMissingResources()
Returns a collection of
ResourceRequirements that describe which resources the
corresponding job is missing. |
boolean |
isRequirementEmpty(org.apache.flink.api.common.JobID jobId)
Returns whether the
ResourceRequirement of the given job is empty. |
void |
notifyAcquiredResource(org.apache.flink.api.common.JobID jobId,
ResourceProfile resourceProfile)
Notifies the tracker about the acquisition of a resource with the given resource profile, for
the given job.
|
void |
notifyLostResource(org.apache.flink.api.common.JobID jobId,
ResourceProfile resourceProfile)
Notifies the tracker about the loss of a resource with the given resource profile, for the
given job.
|
void |
notifyResourceRequirements(org.apache.flink.api.common.JobID jobId,
Collection<ResourceRequirement> resourceRequirements)
Notifies the tracker about a new or updated
ResourceRequirements. |
public void notifyResourceRequirements(org.apache.flink.api.common.JobID jobId,
Collection<ResourceRequirement> resourceRequirements)
ResourceTrackerResourceRequirements.notifyResourceRequirements in interface ResourceTrackerjobId - the job that the resource requirements belongs toresourceRequirements - new resource requirementspublic void notifyAcquiredResource(org.apache.flink.api.common.JobID jobId,
ResourceProfile resourceProfile)
ResourceTrackernotifyAcquiredResource in interface ResourceTrackerjobId - the job that acquired the resourceresourceProfile - profile of the resourcepublic void notifyLostResource(org.apache.flink.api.common.JobID jobId,
ResourceProfile resourceProfile)
ResourceTrackernotifyLostResource in interface ResourceTrackerjobId - the job that lost the resourceresourceProfile - profile of the resourcepublic void clear()
ResourceTrackerclear in interface ResourceTrackerpublic Map<org.apache.flink.api.common.JobID,Collection<ResourceRequirement>> getMissingResources()
ResourceTrackerResourceRequirements that describe which resources the
corresponding job is missing.getMissingResources in interface ResourceTrackerpublic Collection<ResourceRequirement> getAcquiredResources(org.apache.flink.api.common.JobID jobId)
ResourceTrackerResourceRequirements that describe which resources have been
assigned to a job.getAcquiredResources in interface ResourceTrackerjobId - job IDpublic boolean isRequirementEmpty(org.apache.flink.api.common.JobID jobId)
ResourceTrackerResourceRequirement of the given job is empty.isRequirementEmpty in interface ResourceTrackerjobId - job IDResourceRequirement of the given job is emptyCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.