public abstract class CheckpointCommitter extends Object implements Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
jobId |
protected static org.slf4j.Logger |
LOG |
protected String |
operatorId |
| 构造器和说明 |
|---|
CheckpointCommitter() |
| 限定符和类型 | 方法和说明 |
|---|---|
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–2021 The Apache Software Foundation. All rights reserved.