Interface ResourceTracker
-
- All Known Implementing Classes:
DefaultResourceTracker
public interface ResourceTrackerTracks for each job how many resource are required/acquired.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Removes all state from the tracker.Collection<ResourceRequirement>getAcquiredResources(org.apache.flink.api.common.JobID jobId)Returns a collection ofResourceRequirements that describe which resources have been assigned to a job.Map<org.apache.flink.api.common.JobID,Collection<ResourceRequirement>>getMissingResources()Returns a collection ofResourceRequirementsthat describe which resources the corresponding job is missing.booleanisRequirementEmpty(org.apache.flink.api.common.JobID jobId)Returns whether theResourceRequirementof the given job is empty.voidnotifyAcquiredResource(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.voidnotifyLostResource(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.voidnotifyResourceRequirements(org.apache.flink.api.common.JobID jobId, Collection<ResourceRequirement> resourceRequirements)Notifies the tracker about a new or updatedResourceRequirements.
-
-
-
Method Detail
-
notifyResourceRequirements
void notifyResourceRequirements(org.apache.flink.api.common.JobID jobId, Collection<ResourceRequirement> resourceRequirements)Notifies the tracker about a new or updatedResourceRequirements.- Parameters:
jobId- the job that the resource requirements belongs toresourceRequirements- new resource requirements
-
notifyAcquiredResource
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.- Parameters:
jobId- the job that acquired the resourceresourceProfile- profile of the resource
-
notifyLostResource
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.- Parameters:
jobId- the job that lost the resourceresourceProfile- profile of the resource
-
getMissingResources
Map<org.apache.flink.api.common.JobID,Collection<ResourceRequirement>> getMissingResources()
Returns a collection ofResourceRequirementsthat describe which resources the corresponding job is missing.- Returns:
- missing resources for each jobs
-
getAcquiredResources
Collection<ResourceRequirement> getAcquiredResources(org.apache.flink.api.common.JobID jobId)
Returns a collection ofResourceRequirements that describe which resources have been assigned to a job.- Parameters:
jobId- job ID- Returns:
- required/exceeding resources for each jobs
-
isRequirementEmpty
boolean isRequirementEmpty(org.apache.flink.api.common.JobID jobId)
Returns whether theResourceRequirementof the given job is empty.- Parameters:
jobId- job ID- Returns:
- true if the
ResourceRequirementof the given job is empty
-
clear
void clear()
Removes all state from the tracker.
-
-