Class DispatcherResourceCleanerFactory
java.lang.Object
org.apache.flink.runtime.dispatcher.cleanup.DispatcherResourceCleanerFactory
- All Implemented Interfaces:
ResourceCleanerFactory
DispatcherResourceCleanerFactory instantiates ResourceCleaner instances that
clean cleanable resources from the Dispatcher.
We need to handle the JobManagerRunnerRegistry differently due to a dependency between
closing the JobManagerRunner and the HighAvailabilityServices. This is fixed in FLINK-24038 using a feature flag to
enable/disable single leader election for all the JobManager components. We can remove
the priority cleanup logic after removing the per-component leader election.
-
Constructor Summary
ConstructorsConstructorDescriptionDispatcherResourceCleanerFactory(Executor cleanupExecutor, org.apache.flink.util.concurrent.RetryStrategy retryStrategy, JobManagerRunnerRegistry jobManagerRunnerRegistry, ExecutionPlanWriter executionPlanWriter, BlobServer blobServer, HighAvailabilityServices highAvailabilityServices, JobManagerMetricGroup jobManagerMetricGroup) DispatcherResourceCleanerFactory(JobManagerRunnerRegistry jobManagerRunnerRegistry, DispatcherServices dispatcherServices) -
Method Summary
Modifier and TypeMethodDescriptioncreateGlobalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor) CreatesResourceCleanerthat initiatesGloballyCleanableResource.globalCleanupAsync(JobID, Executor)calls.createLocalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor) CreatesResourceCleanerthat initiatesLocallyCleanableResource.localCleanupAsync(JobID, Executor)calls.
-
Constructor Details
-
DispatcherResourceCleanerFactory
public DispatcherResourceCleanerFactory(JobManagerRunnerRegistry jobManagerRunnerRegistry, DispatcherServices dispatcherServices) -
DispatcherResourceCleanerFactory
@VisibleForTesting public DispatcherResourceCleanerFactory(Executor cleanupExecutor, org.apache.flink.util.concurrent.RetryStrategy retryStrategy, JobManagerRunnerRegistry jobManagerRunnerRegistry, ExecutionPlanWriter executionPlanWriter, BlobServer blobServer, HighAvailabilityServices highAvailabilityServices, JobManagerMetricGroup jobManagerMetricGroup)
-
-
Method Details
-
createLocalResourceCleaner
public ResourceCleaner createLocalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor) Description copied from interface:ResourceCleanerFactoryCreatesResourceCleanerthat initiatesLocallyCleanableResource.localCleanupAsync(JobID, Executor)calls.- Specified by:
createLocalResourceCleanerin interfaceResourceCleanerFactory- Parameters:
mainThreadExecutor- Used for validating that theLocallyCleanableResource.localCleanupAsync(JobID, Executor)is called from the main thread.
-
createGlobalResourceCleaner
public ResourceCleaner createGlobalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor) Description copied from interface:ResourceCleanerFactoryCreatesResourceCleanerthat initiatesGloballyCleanableResource.globalCleanupAsync(JobID, Executor)calls.- Specified by:
createGlobalResourceCleanerin interfaceResourceCleanerFactory- Parameters:
mainThreadExecutor- Used for validating that theGloballyCleanableResource.globalCleanupAsync(JobID, Executor)is called from the main thread.
-