You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/04 07:41:52 UTC

[GitHub] [flink] MartijnVisser commented on a diff in pull request #20091: [FLINK-27570][runtime] Fix initialize base locations for checkpoint

MartijnVisser commented on code in PR #20091:
URL: https://github.com/apache/flink/pull/20091#discussion_r912713881


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccess.java:
##########
@@ -113,8 +113,14 @@ public boolean supportsHighlyAvailableStorage() {
 
     @Override
     public void initializeBaseLocationsForCheckpoint() throws IOException {
-        fileSystem.mkdirs(sharedStateDirectory);
-        fileSystem.mkdirs(taskOwnedStateDirectory);
+        if (!fileSystem.mkdirs(sharedStateDirectory)) {
+            throw new IOException(
+                    "Failed to mkdir for sharedStateDirectory: " + sharedStateDirectory);

Review Comment:
   I think this is not the most friendly user error, this should be something like "Failed to create directory for shared state"



##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccess.java:
##########
@@ -113,8 +113,14 @@ public boolean supportsHighlyAvailableStorage() {
 
     @Override
     public void initializeBaseLocationsForCheckpoint() throws IOException {
-        fileSystem.mkdirs(sharedStateDirectory);
-        fileSystem.mkdirs(taskOwnedStateDirectory);
+        if (!fileSystem.mkdirs(sharedStateDirectory)) {
+            throw new IOException(
+                    "Failed to mkdir for sharedStateDirectory: " + sharedStateDirectory);
+        }
+        if (!fileSystem.mkdirs(taskOwnedStateDirectory)) {
+            throw new IOException(
+                    "Failed to mkdir for taskOwnedStateDirectory: " + taskOwnedStateDirectory);

Review Comment:
   Same here, the error message can be improved



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org