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
- Exception
public void setOperatorId(String id) throws Exception
id
- Exception
public abstract void open() throws Exception
Exception
public abstract void close() throws Exception
Exception
public abstract void createResource() throws Exception
Exception
public 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.Exception
public 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.Exception
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.