本文整理了Java中org.apache.flink.runtime.execution.Environment.acknowledgeCheckpoint()
方法的一些代码示例,展示了Environment.acknowledgeCheckpoint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.acknowledgeCheckpoint()
方法的具体详情如下:
包路径:org.apache.flink.runtime.execution.Environment
类名称:Environment
方法名:acknowledgeCheckpoint
[英]Confirms that the invokable has successfully completed all steps it needed to to for the checkpoint with the give checkpoint-ID. This method does not include any state in the checkpoint.
[中]确认可调用程序已成功完成了为具有给定checkpoint-ID的检查点执行所需的所有步骤。此方法不包括检查点中的任何状态。
代码示例来源:origin: apache/flink
@Override
public boolean triggerCheckpoint(final CheckpointMetaData checkpointMetaData, final CheckpointOptions checkpointOptions) {
final TaskStateSnapshot checkpointStateHandles = new TaskStateSnapshot();
checkpointStateHandles.putSubtaskStateByOperatorID(
OperatorID.fromJobVertexID(getEnvironment().getJobVertexId()),
new OperatorSubtaskState());
getEnvironment().acknowledgeCheckpoint(
checkpointMetaData.getCheckpointId(),
new CheckpointMetrics(),
checkpointStateHandles);
triggerCheckpointLatch.countDown();
return true;
}
代码示例来源:origin: apache/flink
verify(mockEnvironment, never()).acknowledgeCheckpoint(eq(checkpointId), any(CheckpointMetrics.class), any(TaskStateSnapshot.class));
内容来源于网络,如有侵权,请联系作者删除!