Interface LocallyCleanableResource
-
- All Known Subinterfaces:
ExecutionPlanStore
,ExecutionPlanWriter
,JobManagerRunnerRegistry
- All Known Implementing Classes:
BlobServer
,DefaultExecutionPlanStore
,DefaultJobManagerRunnerRegistry
,JobManagerMetricGroup
,OnMainThreadJobManagerRunnerRegistry
,StandaloneExecutionPlanStore
,ThrowingExecutionPlanWriter
,UnregisteredMetricGroups.UnregisteredJobManagerMetricGroup
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface LocallyCleanableResource
LocallyCleanableResource
is supposed to be implemented by any class that provides artifacts for a given job that need to be cleaned up after the job reached a local terminal state. Local cleanups that needs to be triggered for a global terminal state as well, need to be implemented using theGloballyCleanableResource
.The
DispatcherResourceCleanerFactory
provides a workaround to trigger someLocallyCleanableResources
as globally cleanable. FLINK-26175 is created to cover a refactoring and straighten things out.- See Also:
JobStatus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Void>
localCleanupAsync(JobID jobId, Executor cleanupExecutor)
localCleanupAsync
is expected to be called from the main thread.
-
-
-
Method Detail
-
localCleanupAsync
CompletableFuture<Void> localCleanupAsync(JobID jobId, Executor cleanupExecutor)
localCleanupAsync
is expected to be called from the main thread. Heavy IO tasks should be outsourced into the passedcleanupExecutor
. Thread-safety must be ensured.- Parameters:
jobId
- TheJobID
of the job for which the local data should be cleaned up.cleanupExecutor
- The fallback executor for IO-heavy operations.- Returns:
- The cleanup result future.
-
-