AlexYinHan commented on code in PR #27042:
URL: https://github.com/apache/flink/pull/27042#discussion_r2425200805


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStPathContainer.java:
##########
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.state.forst;
+
+import org.apache.flink.core.fs.Path;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nullable;
+
+/** Container for ForSt paths. */

Review Comment:
   Comments have been added to the code.



##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStPathContainer.java:
##########
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.state.forst;
+
+import org.apache.flink.core.fs.Path;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nullable;
+
+/** Container for ForSt paths. */
+public class ForStPathContainer {
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(ForStResourceContainer.class);
+    public static final String DB_DIR_STRING = "db";
+
+    @Nullable final Path localJobPath;
+    @Nullable private final Path localBasePath;
+    @Nullable private final Path localForStPath;
+
+    @Nullable private final Path remoteJobPath;
+    @Nullable private final Path remoteBasePath;
+    @Nullable private final Path remoteForStPath;
+
+    public static ForStPathContainer empty() {
+        return of(null, null, null, null);
+    }
+
+    public static ForStPathContainer ofLocal(
+            @Nullable Path localJobPath, @Nullable Path localBasePath) {
+        return new ForStPathContainer(localJobPath, localBasePath, null, null);
+    }
+
+    public static ForStPathContainer of(
+            @Nullable Path localJobPath,
+            @Nullable Path localBasePath,
+            @Nullable Path remoteJobPath,
+            @Nullable Path remoteBasePath) {
+        return new ForStPathContainer(localJobPath, localBasePath, 
remoteJobPath, remoteBasePath);
+    }
+
+    public ForStPathContainer(
+            @Nullable Path localJobPath,
+            @Nullable Path localBasePath,
+            @Nullable Path remoteJobPath,
+            @Nullable Path remoteBasePath) {
+        this.localJobPath = localJobPath;
+        this.localBasePath = localBasePath;
+        this.localForStPath = localBasePath != null ? new Path(localBasePath, 
DB_DIR_STRING) : null;

Review Comment:
   Yes, localJobpath is a subfolder of localBasePath.
   
   ```basePath```,```jobPath``` are allowed to be null, just to stay consistent 
with the code before this PR. Currently the local paths can only be null in UT 
tests.



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