KyleLin0927 commented on code in PR #7238:
URL: https://github.com/apache/gravitino/pull/7238#discussion_r2106064552


##########
catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java:
##########
@@ -296,6 +296,12 @@ public Fileset createMultipleLocationFileset(
 
     // Either catalog property "location", or schema property "location", or 
storageLocation must be
     // set for managed fileset.
+    for (Map.Entry<String, String> e : storageLocations.entrySet()) {
+      if (StringUtils.isBlank(e.getValue())) {
+        throw new IllegalArgumentException(
+            "Storage location for name '" + e.getKey() + "' must not be null 
or blank");
+      }
+    }
     Map<String, Path> schemaPaths =
         getAndCheckSchemaPaths(schemaIdent.name(), schemaEntity.properties());
     if (schemaPaths.isEmpty() && storageLocations.isEmpty()) {

Review Comment:
   Thanks for suggestion. I applied this change, but during testing, I 
encountered a NullPointerException when the input storageLocations map 
contained a mix of valid values and blank/null values.



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