public abstract class AbstractThreadsafeJobResultStore extends Object implements JobResultStore
JobResultStore.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractThreadsafeJobResultStore(Executor ioExecutor) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
createDirtyResultAsync(JobResultEntry jobResultEntry)
Registers the passed
JobResultEntry instance as dirty which indicates that
clean-up operations still need to be performed. |
protected abstract void |
createDirtyResultInternal(JobResultEntry jobResultEntry) |
Set<JobResult> |
getDirtyResults()
Get the persisted
JobResult instances that are marked as dirty. |
protected abstract Set<JobResult> |
getDirtyResultsInternal() |
CompletableFuture<Boolean> |
hasCleanJobResultEntryAsync(org.apache.flink.api.common.JobID jobId)
Returns the future of whether the store contains a
clean entry for the given JobID. |
protected abstract boolean |
hasCleanJobResultEntryInternal(org.apache.flink.api.common.JobID jobId) |
CompletableFuture<Boolean> |
hasDirtyJobResultEntryAsync(org.apache.flink.api.common.JobID jobId)
Returns the future of whether the store contains a
dirty entry for the given JobID. |
protected abstract boolean |
hasDirtyJobResultEntryInternal(org.apache.flink.api.common.JobID jobId) |
CompletableFuture<Boolean> |
hasJobResultEntryAsync(org.apache.flink.api.common.JobID jobId)
Returns the future of whether the store already contains an entry for a job.
|
CompletableFuture<Void> |
markResultAsCleanAsync(org.apache.flink.api.common.JobID jobId)
Marks an existing
JobResultEntry as clean. |
protected abstract void |
markResultAsCleanInternal(org.apache.flink.api.common.JobID jobId) |
protected AbstractThreadsafeJobResultStore(Executor ioExecutor)
public CompletableFuture<Void> createDirtyResultAsync(JobResultEntry jobResultEntry)
JobResultStoreJobResultEntry instance as dirty which indicates that
clean-up operations still need to be performed. Once the job resource cleanup has been
finalized, we can mark the JobResultEntry as clean result using JobResultStore.markResultAsCleanAsync(JobID).createDirtyResultAsync in interface JobResultStorejobResultEntry - The job result we wish to persist.IllegalStateException if the passed jobResultEntry has a JobID attached that is already registered in this JobResultStore.protected abstract void createDirtyResultInternal(JobResultEntry jobResultEntry) throws IOException
IOExceptionpublic CompletableFuture<Void> markResultAsCleanAsync(org.apache.flink.api.common.JobID jobId)
JobResultStoreJobResultEntry as clean. This indicates that no more
resource cleanup steps need to be performed. No actions should be triggered if the passed
JobID belongs to a job that was already marked as clean.markResultAsCleanAsync in interface JobResultStorejobId - Ident of the job we wish to mark as clean.NoSuchElementException. i.e. there is no
corresponding dirty job present in the store for the given JobID.protected abstract void markResultAsCleanInternal(org.apache.flink.api.common.JobID jobId)
throws IOException,
NoSuchElementException
IOExceptionNoSuchElementExceptionpublic CompletableFuture<Boolean> hasJobResultEntryAsync(org.apache.flink.api.common.JobID jobId)
JobResultStorehasJobResultEntryAsync in interface JobResultStorejobId - Ident of the job we wish to check the store for.true if a dirty or clean
JobResultEntry exists for the given JobID; otherwise false.public CompletableFuture<Boolean> hasDirtyJobResultEntryAsync(org.apache.flink.api.common.JobID jobId)
JobResultStoredirty entry for the given JobID.hasDirtyJobResultEntryAsync in interface JobResultStorejobId - Ident of the job we wish to check the store for.true, if a dirty entry exists
for the given JobID; otherwise false.protected abstract boolean hasDirtyJobResultEntryInternal(org.apache.flink.api.common.JobID jobId)
throws IOException
IOExceptionpublic CompletableFuture<Boolean> hasCleanJobResultEntryAsync(org.apache.flink.api.common.JobID jobId)
JobResultStoreclean entry for the given JobID.hasCleanJobResultEntryAsync in interface JobResultStorejobId - Ident of the job we wish to check the store for.true, if a clean entry exists
for the given JobID; otherwise a successfully completed future with false.protected abstract boolean hasCleanJobResultEntryInternal(org.apache.flink.api.common.JobID jobId)
throws IOException
IOExceptionpublic Set<JobResult> getDirtyResults() throws IOException
JobResultStoreJobResult instances that are marked as dirty. This is
useful for recovery of finalization steps.getDirtyResults in interface JobResultStoreJobResults from the store.IOException - if collecting the set of dirty results failed for IO reasons.protected abstract Set<JobResult> getDirtyResultsInternal() throws IOException
IOExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.