rkhachatryan commented on code in PR #25028:
URL: https://github.com/apache/flink/pull/25028#discussion_r1671890364


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/StreamStateHandle.java:
##########
@@ -38,6 +38,14 @@ public interface StreamStateHandle extends StateObject {
     /** @return Content of this handle as bytes array if it is already in 
memory. */
     Optional<byte[]> asBytesIfInMemory();
 
+    /**
+     * @return Path to an underlying file represented by this {@link 
StreamStateHandle} or {@link
+     *     Optional#empty()} if there is no such file.
+     */
+    default Optional<org.apache.flink.core.fs.Path> maybeGetPath() {
+        return Optional.empty();
+    }

Review Comment:
   I was thinking about other potential usages of `maybeGetPath` (not s5cmd), 
e.g. in tests. I'd assume that these handles would return some path, and 
returning `empty` would break this assumption.
   And this wouldn't necessarily mean that s5 will be used for these handles - 
it also depends on the caller (rocksdb downloader).
   Anyways, this would be a NIT, so please feel free to leave it as is.



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