World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#6562] improvement(catalogs): Optimize the code path in createFileset and optimize path (#6689)
Lord of Abyssb6b2f9897ae2
diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java b/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.javaindex 11af5be1ab..ce273ecfe9 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java+++ b/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java@@ -270,9 +270,8 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationstry {// formalize the path to avoid path without scheme, uri, authority, etc.- filesetPath = formalizePath(filesetPath, conf);-FileSystem fs = getFileSystem(filesetPath, conf);+ filesetPath = filesetPath.makeQualified(fs.getUri(), fs.getWorkingDirectory());if (!fs.exists(filesetPath)) {if (!fs.mkdirs(filesetPath)) {throw new RuntimeException(@@ -884,6 +883,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsAtomicReference<FileSystem> fileSystem = new AtomicReference<>();Awaitility.await().atMost(timeoutSeconds, TimeUnit.SECONDS)+ .pollInterval(1, TimeUnit.MILLISECONDS).until(() -> {fileSystem.set(provider.getFileSystem(path, config));