Interface JobGraphWriter
-
- All Superinterfaces:
GloballyCleanableResource,LocallyCleanableResource
- All Known Subinterfaces:
JobGraphStore
- All Known Implementing Classes:
DefaultJobGraphStore,StandaloneJobGraphStore,ThrowingJobGraphWriter
public interface JobGraphWriter extends LocallyCleanableResource, GloballyCleanableResource
Allows to store and remove job graphs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CompletableFuture<Void>globalCleanupAsync(org.apache.flink.api.common.JobID jobId, Executor executor)globalCleanupAsyncis expected to be called from the main thread.default CompletableFuture<Void>localCleanupAsync(org.apache.flink.api.common.JobID jobId, Executor executor)localCleanupAsyncis expected to be called from the main thread.voidputJobGraph(JobGraph jobGraph)Adds theJobGraphinstance.voidputJobResourceRequirements(org.apache.flink.api.common.JobID jobId, JobResourceRequirements jobResourceRequirements)Persistjob resource requirementsfor the given job.
-
-
-
Method Detail
-
putJobGraph
void putJobGraph(JobGraph jobGraph) throws Exception
Adds theJobGraphinstance.If a job graph with the same
JobIDexists, it is replaced.- Throws:
Exception
-
putJobResourceRequirements
void putJobResourceRequirements(org.apache.flink.api.common.JobID jobId, JobResourceRequirements jobResourceRequirements) throws ExceptionPersistjob resource requirementsfor the given job.- Parameters:
jobId- job the given requirements belong tojobResourceRequirements- requirements to persist- Throws:
Exception- in case we're not able to persist the requirements for some reason
-
localCleanupAsync
default CompletableFuture<Void> localCleanupAsync(org.apache.flink.api.common.JobID jobId, Executor executor)
Description copied from interface:LocallyCleanableResourcelocalCleanupAsyncis expected to be called from the main thread. Heavy IO tasks should be outsourced into the passedcleanupExecutor. Thread-safety must be ensured.- Specified by:
localCleanupAsyncin interfaceLocallyCleanableResource- Parameters:
jobId- TheJobIDof the job for which the local data should be cleaned up.executor- The fallback executor for IO-heavy operations.- Returns:
- The cleanup result future.
-
globalCleanupAsync
default CompletableFuture<Void> globalCleanupAsync(org.apache.flink.api.common.JobID jobId, Executor executor)
Description copied from interface:GloballyCleanableResourceglobalCleanupAsyncis expected to be called from the main thread. Heavy IO tasks should be outsourced into the passedcleanupExecutor. Thread-safety must be ensured.- Specified by:
globalCleanupAsyncin interfaceGloballyCleanableResource- Parameters:
jobId- TheJobIDof the job for which the local data should be cleaned up.executor- The fallback executor for IO-heavy operations.- Returns:
- The cleanup result future.
-
-