Class DefaultResourceCleaner<T>
- java.lang.Object
-
- org.apache.flink.runtime.dispatcher.cleanup.DefaultResourceCleaner<T>
-
- All Implemented Interfaces:
ResourceCleaner
public class DefaultResourceCleaner<T> extends Object implements ResourceCleaner
DefaultResourceCleaner
is the default implementation ofResourceCleaner
. It will try to clean up any resource that was added. Failure will result in an individual retry of the cleanup. The overall cleanup result succeeds after all subtasks succeeded.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultResourceCleaner.Builder<T>
Builder
for creatingDefaultResourceCleaner
instances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>
cleanupAsync(JobID jobId)
Cleans job-related data from resources asynchronously.static DefaultResourceCleaner.Builder<GloballyCleanableResource>
forGloballyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor, Executor cleanupExecutor, RetryStrategy retryStrategy)
static DefaultResourceCleaner.Builder<LocallyCleanableResource>
forLocallyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor, Executor cleanupExecutor, RetryStrategy retryStrategy)
-
-
-
Method Detail
-
forLocallyCleanableResources
public static DefaultResourceCleaner.Builder<LocallyCleanableResource> forLocallyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor, Executor cleanupExecutor, RetryStrategy retryStrategy)
-
forGloballyCleanableResources
public static DefaultResourceCleaner.Builder<GloballyCleanableResource> forGloballyCleanableResources(ComponentMainThreadExecutor mainThreadExecutor, Executor cleanupExecutor, RetryStrategy retryStrategy)
-
cleanupAsync
public CompletableFuture<Void> cleanupAsync(JobID jobId)
Description copied from interface:ResourceCleaner
Cleans job-related data from resources asynchronously.- Specified by:
cleanupAsync
in interfaceResourceCleaner
- Parameters:
jobId
- TheJobID
referring to the job for which the data shall be cleaned up.- Returns:
- the cleanup result future.
-
-