zhijiangW 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_r402133516
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriter.java
 ##########
 @@ -18,19 +18,51 @@
 package org.apache.flink.runtime.checkpoint.channel;
 
 import org.apache.flink.annotation.Internal;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
 import org.apache.flink.runtime.io.network.buffer.Buffer;
-import org.apache.flink.runtime.state.StateObject;
+import org.apache.flink.runtime.state.InputChannelStateHandle;
+import org.apache.flink.runtime.state.ResultSubpartitionStateHandle;
 
+import java.io.Closeable;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Future;
 
 /**
  * Writes channel state during checkpoint/savepoint.
  */
 @Internal
-public interface ChannelStateWriter extends AutoCloseable {
+public interface ChannelStateWriter extends Closeable {
+
+       /**
+        * Channel state write result.
+        */
+       class ChannelStateWriteResult {
+               final CompletableFuture<Collection<InputChannelStateHandle>> 
inputChannelStateHandles;
+               final 
CompletableFuture<Collection<ResultSubpartitionStateHandle>> 
resultSubpartitionStateHandles;
+
+               ChannelStateWriteResult() {
+                       this(new CompletableFuture<>(), new 
CompletableFuture<>());
+               }
+
+               
ChannelStateWriteResult(CompletableFuture<Collection<InputChannelStateHandle>> 
i, CompletableFuture<Collection<ResultSubpartitionStateHandle>> r) {
 
 Review comment:
   nit: `i, r` give some meaningful names and split the arguments in separate 
line.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to