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


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/ForStFlinkFileSystem.java:
##########
@@ -46,21 +58,45 @@ 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 = null;
+    private static long cacheCapacity = Long.MAX_VALUE;
+    private static long cacheReservedSize = 0;
 
     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.
+     * @param reserveSize the cache reserved size.
+     */
+    public static void configureCache(Path path, long cacheCap, long 
reserveSize) {

Review Comment:
   Because the `ForStFlinkFileSystem#get()` is still in use, all `static` 
methods and fields in `ForStFlinkFileSystem` will be removed in another pr.



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