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



##########
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:
       As I understand, this factory is a semi-public interface(it has an 
implementation in several places). So perhaps, it doesn't make sense to change 
the name right now. Considering that I don't have the better name in my mind.




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