dawidwys commented on a change in pull request #18341:
URL: https://github.com/apache/flink/pull/18341#discussion_r783728042



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStreamFactory.java
##########
@@ -39,4 +40,31 @@
      */
     CheckpointStateOutputStream 
createCheckpointStateOutputStream(CheckpointedStateScope scope)
             throws IOException;
+
+    /**
+     * Tells if we can duplicate the given {@link StreamStateHandle} into the 
path corresponding to
+     * the given {@link CheckpointedStateScope}.
+     *
+     * <p>This should be a rather cheap operation, preferably not involving 
any remote accesses.
+     *
+     * @param stateHandle The handle to duplicate
+     * @param scope Scope determining the location to duplicate into
+     * @return true, if we can perform the duplication
+     */
+    boolean canFastDuplicate(StreamStateHandle stateHandle, 
CheckpointedStateScope scope)
+            throws IOException;
+
+    /**
+     * Duplicates {@link StreamStateHandle} into the path corresponding to * 
the given {@link
+     * CheckpointedStateScope}.
+     *
+     * <p>You should first check if you can duplicate with {@link
+     * #canFastDuplicate(StreamStateHandle, CheckpointedStateScope)}.
+     *
+     * @param stateHandles The handles to duplicate
+     * @param scope Scope determining the location to duplicate into
+     * @return The duplicated handle
+     */
+    List<StreamStateHandle> duplicate(

Review comment:
       I agree the name does not fit in here well. Do you have any suggestions?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to