org.apache.flink.runtime.execution.Environment.acknowledgeCheckpoint()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中org.apache.flink.runtime.execution.Environment.acknowledgeCheckpoint()方法的一些代码示例,展示了Environment.acknowledgeCheckpoint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.acknowledgeCheckpoint()方法的具体详情如下:
包路径:org.apache.flink.runtime.execution.Environment
类名称:Environment
方法名:acknowledgeCheckpoint

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));

相关文章