THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The detail life cycle for the source stream tasks and the operators would become
Event | Stream Task Status | Operator Status | Final Checkpoint | Stop with Savepoint with Drain | Stop with Savepoint |
---|---|---|---|---|---|
RUNNING | RUNNING | - | - | - | |
No more records or Received Savepoint Trigger | - | - | - | ||
- | finish task (cancel source thread for legacy source and suspend the mailbox for the new source) | finish task (cancel source thread for legacy source and suspend the mailbox for the new source) | |||
Advanced To MAX_WATERMARK and trigger all the event timers | Advanced To MAX_WATERMARK and trigger all the event timers | - | |||
Emit MAX_WATERMARK | Emit MAX_WATERMARK | - | |||
WAITING_FOR_FINAL_CP | FINISHED | call operator.endInput() & operator.finish() | call operator.endInput() & operator.finish() | - | |
Emit EndOfUserRecordsEvent[finished = true] | Emit EndOfUserRecordsEvent[finished = true] | Emit EndOfUserRecordsEvent[finished = false] | |||
when checkpoint triggered, emit Checkpoint Barrier | Emit Checkpoint Barrier | Emit Checkpoint Barrier | |||
Wait for Checkpoint / Savepoint Completed | Wait for Checkpoint / Savepoint Completed | Wait for Checkpoint / Savepoint Completed | |||
Checkpoint Completed | Wait for downstream tasks acknowledge EndOfUserRecordsEvent | Wait for downstream tasks acknowledge EndOfUserRecordsEvent | Wait for downstream tasks acknowledge EndOfUserRecordsEvent | ||
Downstream Tasks acknowledge EndOfUserRecordsEvent | CLOSED | CLOSED | - | - | |
Call operator.close() | Call operator.close() | Call operator.close() | |||
Emit EndOfPartitionEvent | Emit EndOfPartitionEvent | Emit EndOfPartitionEvent |
Similarly, the status for the non-source tasks would become
Event | Stream Task Status | Operator Status | Final Checkpoint | Stop with Savepoint with Drain | Stop with Savepoint |
---|---|---|---|---|---|
RUNNING | RUNNING | - | - | - | |
- | - | - | |||
- | - | - | |||
Aligned on MAX_WATERMARK | Advanced To MAX_WATERMARK and trigger all the event timers | Advanced To MAX_WATERMARK and trigger all the event timers | N/A (MAX_WATERMARK is not emitted in this case) | ||
Emit MAX_WATERMARK | Emit MAX_WATERMARK | N/A | |||
Aligned On EndOfUserRecordsEvent | WAITING_FOR_FINAL_CP | FINISHED | call operator.endInput() & operator.finish() | call operator.endInput() & operator.finish() | - |
Emit EndOfUserRecordsEvent[finished = true] | Emit EndOfUserRecordsEvent[finished = true] | Emit EndOfUserRecordsEvent[finished = false] | |||
Aligned on Checkpoint Barrier | Emit CheckpointBarrier | Emit CheckpointBarrier | Emit CheckpointBarrier | ||
Wait for Checkpoint / Savepoint Completed | Wait for Checkpoint / Savepoint Completed | Wait for Checkpoint / Savepoint Completed | |||
Checkpoint Completed | Wait for downstream tasks acknowledge EndOfUserRecordsEvent | Wait for downstream tasks acknowledge EndOfUserRecordsEvent | Wait for downstream tasks acknowledge EndOfUserRecordsEvent | ||
Downstream Tasks acknowledge EndOfUserRecordsEvent | CLOSED | CLOSED |
Wait for EndOfPartitionEvent | Wait for EndOfPartitionEvent | Wait for EndOfPartitionEvent |
Call operator.close() | Call operator.close() | Call operator.close() | |
Emit EndOfPartitionEvent | Emit EndOfPartitionEvent | Emit EndOfPartitionEvent |
Skip Waiting for the Final Checkpoint If possible
...