fredia commented on code in PR #25561: URL: https://github.com/apache/flink/pull/25561#discussion_r1828883909
########## flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/ForStFlinkFileSystem.java: ########## @@ -75,7 +111,22 @@ public ForStFlinkFileSystem(FileSystem delegateFS, String remoteBase, String loc public static FileSystem get(URI uri) throws IOException { String localBase = remoteLocalMapping.get(uri.toString()); Preconditions.checkNotNull(localBase, "localBase is null, remote uri:" + uri); - return new ForStFlinkFileSystem(FileSystem.get(uri), uri.toString(), localBase); + return new ForStFlinkFileSystem( + FileSystem.get(uri), + uri.toString(), + localBase, + cacheBase == null + ? null + : new FileBasedCache( + Integer.MAX_VALUE, + new BundledCacheLimitPolicy( + new SystemCacheLimitPolicy( + new File(localBase), + cacheReservedSize, + SST_FILE_SIZE), + new FixedCapCacheLimitPolicy(cacheCapacity)), Review Comment: Good suggestion, add `ForStOptions.CACHE_TYPE` for different cache policies. -- 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