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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to