This is an automated email from the ASF dual-hosted git repository. jqin pushed a commit to branch release-1.11 in repository https://gitbox.apache.org/repos/asf/flink.git
commit 571a1d23dc439dccebb4ce2dd3d1b18fc1a575f3 Author: Stephan Ewen <[email protected]> AuthorDate: Fri Nov 27 14:11:30 2020 +0100 [hotfix][runtime] Expand JavaDocs (and reorder methods) in OperatorCoordinator. --- .../coordination/OperatorCoordinator.java | 26 +++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinator.java b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinator.java index 1a6a640..eb324ee 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinator.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinator.java @@ -72,14 +72,7 @@ public interface OperatorCoordinator extends CheckpointListener, AutoCloseable { // ------------------------------------------------------------------------ /** - * Called when one of the subtasks of the task running the coordinated operator failed. - */ - void subtaskFailed(int subtask, @Nullable Throwable reason); - - // ------------------------------------------------------------------------ - - /** - * Takes a checkpoint or the coordinator. The checkpoint is identified by the given ID. + * Takes a checkpoint of the coordinator. The checkpoint is identified by the given ID. * * <p>To confirm the checkpoint and store state in it, the given {@code CompletableFuture} * must be completed with the state. To abort or dis-confirm the checkpoint, the given @@ -148,6 +141,23 @@ public interface OperatorCoordinator extends CheckpointListener, AutoCloseable { void resetToCheckpoint(@Nullable byte[] checkpointData) throws Exception; // ------------------------------------------------------------------------ + + /** + * Called when one of the subtasks of the task running the coordinated operator goes + * through a failover (failure / recovery cycle). + * + * <p>This method is called in case of a <i>partial failover</i> meaning a failover handled + * by the scheduler's failover strategy (by default recovering a pipelined region). + * The method is invoked for each subtask involved in that partial failover. + * + * <p>In contrast to this method, the {@link #resetToCheckpoint(byte[])} method is called in + * the case of a global failover, which is the case when the coordinator (JobManager) fails + * or the scheduler invokes its safety net where the whole system is reset to the latest + * complete checkpoint. + */ + void subtaskFailed(int subtask, @Nullable Throwable reason); + + // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ /**
