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,
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(ComponentMainThreadExecutor mainThreadExecutor)
Creates
ResourceCleaner that initiates GloballyCleanableResource.globalCleanupAsync(JobID, Executor) calls. |
ResourceCleaner |
createLocalResourceCleaner(ComponentMainThreadExecutor mainThreadExecutor)
Creates
ResourceCleaner that initiates LocallyCleanableResource.localCleanupAsync(JobID, Executor) calls. |
public DispatcherResourceCleanerFactory(JobManagerRunnerRegistry jobManagerRunnerRegistry, DispatcherServices dispatcherServices)
@VisibleForTesting public DispatcherResourceCleanerFactory(Executor cleanupExecutor, RetryStrategy retryStrategy, JobManagerRunnerRegistry jobManagerRunnerRegistry, JobGraphWriter jobGraphWriter, BlobServer blobServer, HighAvailabilityServices highAvailabilityServices, JobManagerMetricGroup jobManagerMetricGroup)
public ResourceCleaner createLocalResourceCleaner(ComponentMainThreadExecutor mainThreadExecutor)
ResourceCleanerFactory
ResourceCleaner
that initiates LocallyCleanableResource.localCleanupAsync(JobID, Executor)
calls.createLocalResourceCleaner
in interface ResourceCleanerFactory
mainThreadExecutor
- Used for validating that the LocallyCleanableResource.localCleanupAsync(JobID, Executor)
is called from the main
thread.public ResourceCleaner createGlobalResourceCleaner(ComponentMainThreadExecutor mainThreadExecutor)
ResourceCleanerFactory
ResourceCleaner
that initiates GloballyCleanableResource.globalCleanupAsync(JobID, Executor)
calls.createGlobalResourceCleaner
in interface ResourceCleanerFactory
mainThreadExecutor
- 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.