public class DispatcherResourceCleanerFactory extends Object implements 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 and Description |
|---|
DispatcherResourceCleanerFactory(Executor cleanupExecutor,
org.apache.flink.util.concurrent.RetryStrategy retryStrategy,
JobManagerRunnerRegistry jobManagerRunnerRegistry,
JobGraphWriter jobGraphWriter,
BlobServer blobServer,
HighAvailabilityServices highAvailabilityServices,
JobManagerMetricGroup jobManagerMetricGroup) |
DispatcherResourceCleanerFactory(JobManagerRunnerRegistry jobManagerRunnerRegistry,
DispatcherServices dispatcherServices) |
| Modifier and Type | Method and Description |
|---|---|
ResourceCleaner |
createGlobalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor)
Creates
ResourceCleaner that initiates GloballyCleanableResource.globalCleanupAsync(JobID, Executor) calls. |
ResourceCleaner |
createLocalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor)
Creates
ResourceCleaner that initiates LocallyCleanableResource.localCleanupAsync(JobID, Executor) calls. |
public DispatcherResourceCleanerFactory(JobManagerRunnerRegistry jobManagerRunnerRegistry, DispatcherServices dispatcherServices)
@VisibleForTesting public DispatcherResourceCleanerFactory(Executor cleanupExecutor, org.apache.flink.util.concurrent.RetryStrategy retryStrategy, JobManagerRunnerRegistry jobManagerRunnerRegistry, JobGraphWriter jobGraphWriter, BlobServer blobServer, HighAvailabilityServices highAvailabilityServices, JobManagerMetricGroup jobManagerMetricGroup)
public ResourceCleaner createLocalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor)
ResourceCleanerFactoryResourceCleaner that initiates LocallyCleanableResource.localCleanupAsync(JobID, Executor) calls.createLocalResourceCleaner in interface ResourceCleanerFactorymainThreadExecutor - Used for validating that the LocallyCleanableResource.localCleanupAsync(JobID, Executor) is called from the main
thread.public ResourceCleaner createGlobalResourceCleaner(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor)
ResourceCleanerFactoryResourceCleaner that initiates GloballyCleanableResource.globalCleanupAsync(JobID, Executor) calls.createGlobalResourceCleaner in interface ResourceCleanerFactorymainThreadExecutor - Used for validating that the GloballyCleanableResource.globalCleanupAsync(JobID, Executor) is called from the main
thread.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.