fredia commented on code in PR #25561:
URL: https://github.com/apache/flink/pull/25561#discussion_r1814198955


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/ForStFlinkFileSystem.java:
##########
@@ -46,21 +54,44 @@ public class ForStFlinkFileSystem extends FileSystem {
     // TODO: make it configurable
     private static final int DEFAULT_INPUT_STREAM_CAPACITY = 32;
 
+    private static final long SST_FILE_SIZE = 1024 * 1024 * 64;
+
     private static final Map<String, String> remoteLocalMapping = new 
ConcurrentHashMap<>();
     private static final Function<String, Boolean> miscFileFilter = s -> 
!s.endsWith(".sst");
+    private static Path cacheBase;
+    private static long cacheCapacity = Long.MAX_VALUE;
 
     private final FileSystem localFS;
     private final FileSystem delegateFS;
     private final String remoteBase;
     private final Function<String, Boolean> localFileFilter;
     private final String localBase;
+    @Nullable private final FileBasedCache fileBasedCache;
 
-    public ForStFlinkFileSystem(FileSystem delegateFS, String remoteBase, 
String localBase) {
+    public ForStFlinkFileSystem(
+            FileSystem delegateFS,
+            String remoteBase,
+            String localBase,
+            @Nullable FileBasedCache fileBasedCache) {
         this.localFS = FileSystem.getLocalFileSystem();
         this.delegateFS = delegateFS;
         this.localFileFilter = miscFileFilter;
         this.remoteBase = remoteBase;
         this.localBase = localBase;
+        this.fileBasedCache = fileBasedCache;
+    }
+
+    /**
+     * Configure cache for ForStFlinkFileSystem.
+     *
+     * @param path the cache base path.
+     * @param cacheCap the cache capacity.
+     */
+    public static void configureCache(Path path, long cacheCap) {

Review Comment:
   Thanks for the suggestion, it will be changed after forstjni update.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to