rkhachatryan commented on a change in pull request #11515: [FLINK-16744][task]
implement channel state persistence for unaligned checkpoints
URL: https://github.com/apache/flink/pull/11515#discussion_r405123512
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java
##########
@@ -55,20 +68,33 @@
CloseableRegistry closeableRegistry,
ExecutorService executorService,
Environment env,
- AsyncExceptionHandler asyncExceptionHandler) {
- this.checkpointStorage = checkNotNull(checkpointStorage);
+ AsyncExceptionHandler asyncExceptionHandler,
+ boolean sendChannelState) throws IOException {
+ this.checkpointStorage = new
CachingCheckpointStorageWorkerView(checkNotNull(checkpointStorage));
this.taskName = checkNotNull(taskName);
this.closeableRegistry = checkNotNull(closeableRegistry);
this.executorService = checkNotNull(executorService);
this.env = checkNotNull(env);
this.asyncExceptionHandler =
checkNotNull(asyncExceptionHandler);
this.actionExecutor = actionExecutor;
+ this.channelStateWriter = sendChannelState ?
openChannelStateWriter() : ChannelStateWriter.NO_OP;
+ this.closeableRegistry.registerCloseable(this);
+ }
+
+ private ChannelStateWriterImpl openChannelStateWriter() {
+ ChannelStateWriterImpl writer = new
ChannelStateWriterImpl(this.checkpointStorage);
+ writer.open();
Review comment:
It starts a thread and it doesn't affect fields.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services