masteryhx commented on code in PR #24854:
URL: https://github.com/apache/flink/pull/24854#discussion_r1616937508


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStStateBackend.java:
##########
@@ -309,11 +300,13 @@ public <K> ForStKeyedStateBackend<K> 
createAsyncKeyedStateBackend(
         lazyInitializeForJob(env, fileCompatibleIdentifier);
 
         String childPath =
-                "job_" + jobId + "_op_" + fileCompatibleIdentifier + "_uuid_" 
+ UUID.randomUUID();
+                String.format(
+                        "%s/op_%s_attempt_%s",

Review Comment:
   How about also using `new Path(xxx, yyy)` here to avoid explicit "/" 
separator ?



##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStKeyedStateBackendBuilder.java:
##########
@@ -180,11 +180,21 @@ public ForStKeyedStateBackend<K> build() throws 
BackendBuildingException {
     }
 
     private ForStRestoreOperation getForStRestoreOperation() {
-        DBOptions dbOptions = optionsContainer.getDbOptions();
+        // Currently, ForStDB does not support mixing local-dir and 
remote-dir, and ForStDB will
+        // concatenates the dfs directory with the local directory as working 
dir when using flink
+        // env. We expect to directly use the dfs directory in flink env or 
local directory as
+        // working dir. We will implement this in ForStDB later, but before 
that, we achieved this
+        // by setting the dbPath to "/" when the dfs directory existed.
+        // TODO: use localForStPath as dbPath after ForSt Support mixing 
local-dir and remote-dir
+        File instanceRocksDBPath =

Review Comment:
   ```suggestion
           File instanceForStPath =
   ```



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