public abstract class CheckpointCommitter extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String |
jobId |
protected static org.slf4j.Logger |
LOG |
protected String |
operatorId |
| Constructor and Description |
|---|
CheckpointCommitter() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Closes the resource/connection to it.
|
abstract void |
commitCheckpoint(int subtaskIdx,
long checkpointID)
Mark the given checkpoint as completed in the resource.
|
abstract void |
createResource()
Creates/opens/connects to the resource that is used to store information.
|
abstract boolean |
isCheckpointCommitted(int subtaskIdx,
long checkpointID)
Checked the resource whether the given checkpoint was committed completely.
|
abstract void |
open()
Opens/connects to the resource, and possibly creates it beforehand.
|
void |
setJobId(String id)
Internally used to set the job ID after instantiation.
|
void |
setOperatorId(String id)
Internally used to set the operator ID after instantiation.
|
protected static final org.slf4j.Logger LOG
protected String jobId
protected String operatorId
public void setJobId(String id) throws Exception
id - Exceptionpublic void setOperatorId(String id) throws Exception
id - Exceptionpublic abstract void open()
throws Exception
Exceptionpublic abstract void close()
throws Exception
Exceptionpublic abstract void createResource()
throws Exception
Exceptionpublic abstract void commitCheckpoint(int subtaskIdx,
long checkpointID)
throws Exception
subtaskIdx - the index of the subtask responsible for committing the checkpoint.checkpointID - the id of the checkpoint to be committed.Exceptionpublic abstract boolean isCheckpointCommitted(int subtaskIdx,
long checkpointID)
throws Exception
subtaskIdx - the index of the subtask responsible for committing the checkpoint.checkpointID - the id of the checkpoint we are interested in.ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.