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.
| 构造器和说明 |
|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 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 在接口中 ResourceCleanerFactorymainThreadExecutor - Used for validating that the GloballyCleanableResource.globalCleanupAsync(JobID, Executor) is called from the main
thread.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.