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


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStResourceContainer.java:
##########
@@ -331,25 +331,21 @@ public void prepareDirectories() throws Exception {
                     new Path(localBasePath.getPath()), new 
Path(localForStPath.getPath()));
         }
         if (remoteForStPath != null && localForStPath != null) {
-            ForStFlinkFileSystem.setupLocalBasePath(
-                    remoteForStPath.toString(), localForStPath.toString());
-        }
-        if (cacheReservedSize > 0 || cacheCapacity > 0) {
-            if (cacheBasePath == null && localBasePath != null) {
-                cacheBasePath = new Path(localBasePath.getPath(), "cache");
-                LOG.info(
-                        "Cache base path is not configured, set to local base 
path: {}",
-                        cacheBasePath);
-            }
-            ForStFlinkFileSystem.configureCache(cacheBasePath, cacheCapacity, 
cacheReservedSize);
-        }
-        if (remoteForStPath != null) {
-            forstFileSystem = 
ForStFlinkFileSystem.get(remoteForStPath.toUri());
+            forstFileSystem =
+                    ForStFlinkFileSystem.get(
+                            remoteForStPath.toUri(),
+                            localForStPath,
+                            ForStFlinkFileSystem.getFileBasedCache(
+                                    cacheBasePath, cacheCapacity, 
cacheReservedSize));

Review Comment:
   If `cacheBasePath` is not configured, it should be fallback to 
`localBasedPath/cache`.



##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/ForStFlinkFileSystem.java:
##########
@@ -62,9 +62,6 @@ public class ForStFlinkFileSystem extends FileSystem {
 

Review Comment:
   Cam `remoteLocalMapping` also be removed?



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