public interface JobGraphWriter extends LocallyCleanableResource, GloballyCleanableResource
Modifier and Type | Method and Description |
---|---|
default CompletableFuture<Void> |
globalCleanupAsync(JobID jobId,
Executor executor)
globalCleanupAsync is expected to be called from the main thread. |
default CompletableFuture<Void> |
localCleanupAsync(JobID jobId,
Executor executor)
localCleanupAsync is expected to be called from the main thread. |
void |
putJobGraph(JobGraph jobGraph)
Adds the
JobGraph instance. |
void |
putJobResourceRequirements(JobID jobId,
JobResourceRequirements jobResourceRequirements)
Persist
job resource requirements for the given job. |
void putJobResourceRequirements(JobID jobId, JobResourceRequirements jobResourceRequirements) throws Exception
job resource requirements
for the given job.jobId
- job the given requirements belong tojobResourceRequirements
- requirements to persistException
- in case we're not able to persist the requirements for some reasondefault CompletableFuture<Void> localCleanupAsync(JobID jobId, Executor executor)
LocallyCleanableResource
localCleanupAsync
is expected to be called from the main thread. Heavy IO tasks
should be outsourced into the passed cleanupExecutor
. Thread-safety must be ensured.localCleanupAsync
in interface LocallyCleanableResource
jobId
- The JobID
of the job for which the local data should be cleaned up.executor
- The fallback executor for IO-heavy operations.default CompletableFuture<Void> globalCleanupAsync(JobID jobId, Executor executor)
GloballyCleanableResource
globalCleanupAsync
is expected to be called from the main thread. Heavy IO tasks
should be outsourced into the passed cleanupExecutor
. Thread-safety must be ensured.globalCleanupAsync
in interface GloballyCleanableResource
jobId
- The JobID
of the job for which the local data should be cleaned up.executor
- The fallback executor for IO-heavy operations.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.