mchades commented on code in PR #7794:
URL: https://github.com/apache/gravitino/pull/7794#discussion_r2255764707
##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -715,10 +701,6 @@ public String getFileLocation(NameIdentifier ident, String
subPath, String locat
case RENAME:
// Fileset only mounts a single file, the storage location of the
fileset cannot be
// renamed; Otherwise the metadata in the Gravitino server may be
inconsistent.
Review Comment:
the code comments also need to be removed?
BTW, this change breaks compatibility. We should also update the user
documentation.
##########
catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java:
##########
@@ -447,6 +446,11 @@ public Fileset createMultipleLocationFileset(
filesetPathsBuilder.put(entry.getKey(), formalizePath);
FileSystem fs = getFileSystemWithCache(formalizePath, conf);
+
+ if (fs.exists(formalizePath) &&
fs.getFileStatus(formalizePath).isFile()) {
+ throw new RuntimeException("Fileset location cannot be a file: " +
formalizePath);
+ }
Review Comment:
should we also check the location of catalog/schema when creating a
catalog/schema
--
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]