public abstract class AbstractThreadsafeJobResultStore extends Object implements JobResultStore
JobResultStore.| Constructor and Description |
|---|
AbstractThreadsafeJobResultStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
createDirtyResult(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() |
boolean |
hasCleanJobResultEntry(org.apache.flink.api.common.JobID jobId)
Returns whether the store already contains a
clean entry for the given JobID. |
protected abstract boolean |
hasCleanJobResultEntryInternal(org.apache.flink.api.common.JobID jobId) |
boolean |
hasDirtyJobResultEntry(org.apache.flink.api.common.JobID jobId)
Returns whether the store already contains a
dirty entry for the given JobID. |
protected abstract boolean |
hasDirtyJobResultEntryInternal(org.apache.flink.api.common.JobID jobId) |
boolean |
hasJobResultEntry(org.apache.flink.api.common.JobID jobId)
Returns whether the store already contains an entry for a job.
|
void |
markResultAsClean(org.apache.flink.api.common.JobID jobId)
Marks an existing
JobResultEntry as clean. |
protected abstract void |
markResultAsCleanInternal(org.apache.flink.api.common.JobID jobId) |
public void createDirtyResult(JobResultEntry jobResultEntry) throws IOException
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.markResultAsClean(JobID).createDirtyResult in interface JobResultStorejobResultEntry - The job result we wish to persist.IOException - if the creation of the dirty result failed for IO reasons.protected abstract void createDirtyResultInternal(JobResultEntry jobResultEntry) throws IOException
IOExceptionpublic void markResultAsClean(org.apache.flink.api.common.JobID jobId)
throws IOException,
NoSuchElementException
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.markResultAsClean in interface JobResultStorejobId - Ident of the job we wish to mark as clean.IOException - if marking the dirty JobResultEntry as clean
failed for IO reasons.NoSuchElementException - if 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 boolean hasJobResultEntry(org.apache.flink.api.common.JobID jobId)
throws IOException
JobResultStorehasJobResultEntry 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.IOException - if determining whether a job entry is present in the store failed for IO
reasons.public boolean hasDirtyJobResultEntry(org.apache.flink.api.common.JobID jobId)
throws IOException
JobResultStoredirty entry for the given JobID.hasDirtyJobResultEntry 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.IOException - if determining whether a job entry is present in the store failed for IO
reasons.protected abstract boolean hasDirtyJobResultEntryInternal(org.apache.flink.api.common.JobID jobId)
throws IOException
IOExceptionpublic boolean hasCleanJobResultEntry(org.apache.flink.api.common.JobID jobId)
throws IOException
JobResultStoreclean entry for the given JobID.hasCleanJobResultEntry 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
false.IOException - if determining whether a job entry is present in the store failed for IO
reasons.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–2023 The Apache Software Foundation. All rights reserved.