World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#7421] improve(catalog-fileset): Change the Hadoop catalog to Fileset catalog (#7424)
Jerry Shao8b30c432e03f
diff --git a/api/src/main/java/org/apache/gravitino/Catalog.java b/api/src/main/java/org/apache/gravitino/Catalog.javaindex 7035ed9480..b23bc6a824 100644--- a/api/src/main/java/org/apache/gravitino/Catalog.java+++ b/api/src/main/java/org/apache/gravitino/Catalog.java@@ -43,7 +43,7 @@ public interface Catalog extends Auditable {RELATIONAL(false),/** Catalog Type for Fileset System (including HDFS, S3, etc.), like path/to/file */- FILESET(false),+ FILESET(true),/** Catalog Type for Message Queue, like Kafka://topic */MESSAGING(false),@@ -68,7 +68,7 @@ public interface Catalog extends Auditable {* the provider to create the managed catalog. If the catalog type does not support managed* catalog, users need to specify the provider when creating the catalog.*- * <p>Currently, only the model catalog supports managed catalog.+ * <p>Currently, the model and fileset catalogs support managed catalog.** @return Whether the catalog type supports managed catalog. Returns true if the catalog type* supports managed catalog.diff --git a/api/src/main/java/org/apache/gravitino/CatalogProvider.java b/api/src/main/java/org/apache/gravitino/CatalogProvider.javaindex e0778c1e1e..e711378878 100644--- a/api/src/main/java/org/apache/gravitino/CatalogProvider.java+++ b/api/src/main/java/org/apache/gravitino/CatalogProvider.java@@ -31,8 +31,8 @@ import org.apache.gravitino.annotation.Evolving;* <p>Managed catalog: A catalog and its subsidiary objects are all managed by Gravitino. Gravitino* takes care of the lifecycle of the catalog and its objects. For those catalogs, Gravitino uses* the type of the catalog as the provider short name. Note that for each catalog type, there is- * only one implementation of managed catalog for that type. Currently, Gravitino only has model- * catalog that is a managed catalog.+ * only one implementation of managed catalog for that type. Currently, Gravitino has model and+ * fileset catalogs that are managed catalogs.** <p>External catalog: A catalog its subsidiary objects are stored by an external sources, such as* Hive catalog, the DB and tables are stored in HMS. For those catalogs, Gravitino uses a uniquediff --git a/api/src/main/java/org/apache/gravitino/SupportsCatalogs.java b/api/src/main/java/org/apache/gravitino/SupportsCatalogs.javaindex 70a291a6df..088279b69f 100644--- a/api/src/main/java/org/apache/gravitino/SupportsCatalogs.java+++ b/api/src/main/java/org/apache/gravitino/SupportsCatalogs.java@@ -81,8 +81,8 @@ public interface SupportsCatalogs {* catalog should be created. The short name:** <p>1) should be the same as the {@link CatalogProvider} interface provided. 2) can be "null" if- * the created catalog is the managed catalog, like model catalog. For the details of the provider- * definition, see {@link CatalogProvider}.+ * the created catalog is the managed catalog, like model, fileset catalog. For the details of the+ * provider definition, see {@link CatalogProvider}.** @param catalogName the name of the catalog.* @param type the type of the catalog.diff --git a/authorizations/authorization-ranger/build.gradle.kts b/authorizations/authorization-ranger/build.gradle.ktsindex b0094178fa..75af033f44 100644--- a/authorizations/authorization-ranger/build.gradle.kts+++ b/authorizations/authorization-ranger/build.gradle.kts@@ -137,7 +137,16 @@ tasks.test {doFirst {environment("HADOOP_USER_NAME", "gravitino")}- dependsOn(":catalogs:catalog-hive:jar", ":catalogs:catalog-hive:runtimeJars", ":catalogs:catalog-lakehouse-iceberg:jar", ":catalogs:catalog-lakehouse-iceberg:runtimeJars", ":catalogs:catalog-lakehouse-paimon:jar", ":catalogs:catalog-lakehouse-paimon:runtimeJars", ":catalogs:catalog-hadoop:jar", ":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(+ ":catalogs:catalog-hive:jar",+ ":catalogs:catalog-hive:runtimeJars",+ ":catalogs:catalog-lakehouse-iceberg:jar",+ ":catalogs:catalog-lakehouse-iceberg:runtimeJars",+ ":catalogs:catalog-lakehouse-paimon:jar",+ ":catalogs:catalog-lakehouse-paimon:runtimeJars",+ ":catalogs:catalog-fileset:jar",+ ":catalogs:catalog-fileset:runtimeJars"+ )val skipITs = project.hasProperty("skipITs")if (skipITs) {diff --git a/build.gradle.kts b/build.gradle.ktsindex 3676d95771..35f67c4edb 100644--- a/build.gradle.kts+++ b/build.gradle.kts@@ -861,7 +861,7 @@ tasks {register("copyCatalogLibAndConfigs", Copy::class) {dependsOn(- ":catalogs:catalog-hadoop:copyLibAndConfig",+ ":catalogs:catalog-fileset:copyLibAndConfig",":catalogs:catalog-hive:copyLibAndConfig",":catalogs:catalog-jdbc-doris:copyLibAndConfig",":catalogs:catalog-jdbc-mysql:copyLibAndConfig",diff --git a/bundles/aliyun-bundle/build.gradle.kts b/bundles/aliyun-bundle/build.gradle.ktsindex d4b400cbe6..6d3409e37e 100644--- a/bundles/aliyun-bundle/build.gradle.kts+++ b/bundles/aliyun-bundle/build.gradle.kts@@ -58,5 +58,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/aliyun/build.gradle.kts b/bundles/aliyun/build.gradle.ktsindex 0b463509ca..910b490644 100644--- a/bundles/aliyun/build.gradle.kts+++ b/bundles/aliyun/build.gradle.kts@@ -27,7 +27,7 @@ plugins {dependencies {compileOnly(project(":api"))compileOnly(project(":catalogs:catalog-common"))- compileOnly(project(":catalogs:catalog-hadoop"))+ compileOnly(project(":catalogs:catalog-fileset"))compileOnly(project(":core"))compileOnly(libs.hadoop3.client.api)compileOnly(libs.hadoop3.client.runtime)@@ -93,5 +93,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/aws-bundle/build.gradle.kts b/bundles/aws-bundle/build.gradle.ktsindex c4e16bc069..e5ae68fb38 100644--- a/bundles/aws-bundle/build.gradle.kts+++ b/bundles/aws-bundle/build.gradle.kts@@ -52,5 +52,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/aws/build.gradle.kts b/bundles/aws/build.gradle.ktsindex a9dfebd7e4..c452782532 100644--- a/bundles/aws/build.gradle.kts+++ b/bundles/aws/build.gradle.kts@@ -27,7 +27,7 @@ plugins {dependencies {compileOnly(project(":api"))compileOnly(project(":catalogs:catalog-common"))- compileOnly(project(":catalogs:catalog-hadoop"))+ compileOnly(project(":catalogs:catalog-fileset"))compileOnly(project(":core"))compileOnly(libs.hadoop3.aws)compileOnly(libs.hadoop3.client.api)@@ -74,5 +74,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/azure-bundle/build.gradle.kts b/bundles/azure-bundle/build.gradle.ktsindex c65e24637b..5681716c58 100644--- a/bundles/azure-bundle/build.gradle.kts+++ b/bundles/azure-bundle/build.gradle.kts@@ -55,5 +55,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/azure/build.gradle.kts b/bundles/azure/build.gradle.ktsindex 4b137ccfab..9364cdc783 100644--- a/bundles/azure/build.gradle.kts+++ b/bundles/azure/build.gradle.kts@@ -26,7 +26,7 @@ plugins {dependencies {compileOnly(project(":api"))- compileOnly(project(":catalogs:catalog-hadoop"))+ compileOnly(project(":catalogs:catalog-fileset"))compileOnly(project(":core"))compileOnly(libs.hadoop3.abs)compileOnly(libs.hadoop3.client.api)@@ -77,5 +77,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/gcp-bundle/build.gradle.kts b/bundles/gcp-bundle/build.gradle.ktsindex 6f3c5df771..dcbb990d61 100644--- a/bundles/gcp-bundle/build.gradle.kts+++ b/bundles/gcp-bundle/build.gradle.kts@@ -62,5 +62,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/bundles/gcp/build.gradle.kts b/bundles/gcp/build.gradle.ktsindex 9d1b6b7654..a15890864d 100644--- a/bundles/gcp/build.gradle.kts+++ b/bundles/gcp/build.gradle.kts@@ -27,7 +27,7 @@ plugins {dependencies {compileOnly(project(":api"))compileOnly(project(":catalogs:catalog-common"))- compileOnly(project(":catalogs:catalog-hadoop"))+ compileOnly(project(":catalogs:catalog-fileset"))compileOnly(project(":core"))compileOnly(libs.hadoop3.client.api)@@ -76,5 +76,5 @@ tasks.jar {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}diff --git a/catalogs/catalog-hadoop/build.gradle.kts b/catalogs/catalog-fileset/build.gradle.ktssimilarity index 96%rename from catalogs/catalog-hadoop/build.gradle.ktsrename to catalogs/catalog-fileset/build.gradle.ktsindex cfcf8b0c5e..88382a38a8 100644--- a/catalogs/catalog-hadoop/build.gradle.kts+++ b/catalogs/catalog-fileset/build.gradle.kts@@ -16,7 +16,7 @@* specific language governing permissions and limitations* under the License.*/-description = "catalog-hadoop"+description = "catalog-fileset"plugins {`maven-publish`@@ -109,14 +109,14 @@ tasks {exclude("kerb-*.jar")exclude("kerby-*.jar")}- into("$rootDir/distribution/package/catalogs/hadoop/libs")+ into("$rootDir/distribution/package/catalogs/fileset/libs")}val copyCatalogConfig by registering(Copy::class) {from("src/main/resources")- into("$rootDir/distribution/package/catalogs/hadoop/conf")+ into("$rootDir/distribution/package/catalogs/fileset/conf")- include("hadoop.conf")+ include("fileset.conf")include("core-site.xml.template")include("hdfs-site.xml.template")diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogCapability.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogCapability.javasimilarity index 84%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogCapability.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogCapability.javaindex 0b23f11c01..ef9e18a514 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogCapability.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogCapability.java@@ -16,20 +16,20 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import java.util.Objects;import org.apache.gravitino.connector.capability.Capability;import org.apache.gravitino.connector.capability.CapabilityResult;-public class HadoopCatalogCapability implements Capability {+public class FilesetCatalogCapability implements Capability {@Overridepublic CapabilityResult managedStorage(Scope scope) {if (Objects.requireNonNull(scope) == Scope.SCHEMA) {return CapabilityResult.SUPPORTED;}return CapabilityResult.unsupported(- String.format("Hadoop catalog does not support managed storage for %s.", scope));+ String.format("Fileset catalog does not support managed storage for %s.", scope));}@Override@@ -41,7 +41,7 @@ public class HadoopCatalogCapability implements Capability {if (name.contains("/")) {return CapabilityResult.unsupported(- String.format("Hadoop catalog does not support '/' in the name for %s.", scope));+ String.format("Fileset catalog does not support '/' in the name for %s.", scope));}return CapabilityResult.SUPPORTED;diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalog.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogImpl.javasimilarity index 76%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalog.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogImpl.javaindex 193219ab8d..c403edf904 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalog.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogImpl.java@@ -16,7 +16,7 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import java.util.Map;import org.apache.gravitino.connector.BaseCatalog;@@ -29,31 +29,29 @@ import org.apache.gravitino.connector.capability.Capability;* Systems, like Local, HDFS, S3, ADLS, etc., using the Hadoop FileSystem API. It can manage* filesets from different Hadoop Compatible File Systems in the same catalog.*/-public class HadoopCatalog extends BaseCatalog<HadoopCatalog> {+public class FilesetCatalogImpl extends BaseCatalog<FilesetCatalogImpl> {- static final HadoopCatalogPropertiesMetadata CATALOG_PROPERTIES_META =- new HadoopCatalogPropertiesMetadata();+ static final FilesetCatalogPropertiesMetadata CATALOG_PROPERTIES_META =+ new FilesetCatalogPropertiesMetadata();- static final HadoopSchemaPropertiesMetadata SCHEMA_PROPERTIES_META =- new HadoopSchemaPropertiesMetadata();+ static final FilesetSchemaPropertiesMetadata SCHEMA_PROPERTIES_META =+ new FilesetSchemaPropertiesMetadata();- static final HadoopFilesetPropertiesMetadata FILESET_PROPERTIES_META =- new HadoopFilesetPropertiesMetadata();+ static final FilesetPropertiesMetadata FILESET_PROPERTIES_META = new FilesetPropertiesMetadata();@Overridepublic String shortName() {- return "hadoop";+ return "fileset";}@Overrideprotected CatalogOperations newOps(Map<String, String> config) {- CatalogOperations ops = new SecureHadoopCatalogOperations();- return ops;+ return new SecureFilesetCatalogOperations();}@Overrideprotected Capability newCapability() {- return new HadoopCatalogCapability();+ return new FilesetCatalogCapability();}@Overridediff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.javasimilarity index 93%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.javaindex fab9b4b9f6..ef88bdf175 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogOperations.java@@ -16,9 +16,9 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.CACHE_VALUE_NOT_SET;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.CACHE_VALUE_NOT_SET;import static org.apache.gravitino.connector.BaseCatalog.CATALOG_BYPASS_PREFIX;import static org.apache.gravitino.file.Fileset.LOCATION_NAME_UNKNOWN;import static org.apache.gravitino.file.Fileset.PROPERTY_CATALOG_PLACEHOLDER;@@ -102,7 +102,7 @@ import org.awaitility.core.ConditionTimeoutException;import org.slf4j.Logger;import org.slf4j.LoggerFactory;-public class HadoopCatalogOperations extends ManagedSchemaOperations+public class FilesetCatalogOperations extends ManagedSchemaOperationsimplements CatalogOperations, FilesetCatalog, FilesetFileOps {private static final String SCHEMA_DOES_NOT_EXIST_MSG = "Schema %s does not exist";private static final String FILESET_DOES_NOT_EXIST_MSG = "Fileset %s does not exist";@@ -110,7 +110,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations// location placeholder pattern format: {{placeholder}}private static final Pattern LOCATION_PLACEHOLDER_PATTERN = Pattern.compile("\\{\\{(.*?)\\}\\}");- private static final Logger LOG = LoggerFactory.getLogger(HadoopCatalogOperations.class);+ private static final Logger LOG = LoggerFactory.getLogger(FilesetCatalogOperations.class);private final EntityStore store;@@ -130,13 +130,13 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsprivate boolean disableFSOps;- private Cache<NameIdentifier, HadoopFileset> filesetCache;+ private Cache<NameIdentifier, FilesetImpl> filesetCache;- HadoopCatalogOperations(EntityStore store) {+ FilesetCatalogOperations(EntityStore store) {this.store = store;}- public HadoopCatalogOperations() {+ public FilesetCatalogOperations() {this(GravitinoEnv.getInstance().entityStore());}@@ -171,13 +171,13 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations(boolean)propertiesMetadata.catalogPropertiesMetadata()- .getOrDefault(config, HadoopCatalogPropertiesMetadata.DISABLE_FILESYSTEM_OPS);+ .getOrDefault(config, FilesetCatalogPropertiesMetadata.DISABLE_FILESYSTEM_OPS);if (!disableFSOps) {String fileSystemProviders =(String)propertiesMetadata.catalogPropertiesMetadata()- .getOrDefault(config, HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS);+ .getOrDefault(config, FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS);this.fileSystemProvidersMap =ImmutableMap.<String, FileSystemProvider>builder().putAll(FileSystemUtils.getFileSystemProviders(fileSystemProviders))@@ -187,7 +187,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations(String)propertiesMetadata.catalogPropertiesMetadata()- .getOrDefault(config, HadoopCatalogPropertiesMetadata.DEFAULT_FS_PROVIDER);+ .getOrDefault(config, FilesetCatalogPropertiesMetadata.DEFAULT_FS_PROVIDER);this.defaultFileSystemProvider =FileSystemUtils.getFileSystemProviderByName(fileSystemProvidersMap, defaultFileSystemProviderName);@@ -224,7 +224,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsFilesetEntity filesetEntity =store.get(ident, Entity.EntityType.FILESET, FilesetEntity.class);- return HadoopFileset.builder()+ return FilesetImpl.builder().withName(ident.name()).withType(filesetEntity.filesetType()).withComment(filesetEntity.comment())@@ -448,8 +448,8 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsthrow new RuntimeException("Failed to create fileset " + ident, ioe);}- HadoopFileset fileset =- HadoopFileset.builder()+ FilesetImpl fileset =+ FilesetImpl.builder().withName(ident.name()).withComment(comment).withType(type)@@ -521,8 +521,8 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsEntity.EntityType.FILESET,e -> updateFilesetEntity(ident, e, changes));- HadoopFileset fileset =- HadoopFileset.builder()+ FilesetImpl fileset =+ FilesetImpl.builder().withName(updatedFilesetEntity.name()).withComment(updatedFilesetEntity.comment()).withType(updatedFilesetEntity.filesetType())@@ -899,7 +899,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations}/**- * Since the Hadoop catalog was completely managed by Gravitino, we don't need to test the+ * Since the Fileset catalog was completely managed by Gravitino, we don't need to test the* connection** @param catalogIdent the name of the catalog.@@ -923,7 +923,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsfilesetCache.invalidateAll();}- private Cache<NameIdentifier, HadoopFileset> initializeFilesetCache(Map<String, String> config) {+ private Cache<NameIdentifier, FilesetImpl> initializeFilesetCache(Map<String, String> config) {Caffeine<Object, Object> cacheBuilder =Caffeine.newBuilder().removalListener(@@ -942,7 +942,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationspropertiesMetadata.catalogPropertiesMetadata().getOrDefault(- config, HadoopCatalogPropertiesMetadata.FILESET_CACHE_EVICTION_INTERVAL_MS);+ config, FilesetCatalogPropertiesMetadata.FILESET_CACHE_EVICTION_INTERVAL_MS);if (cacheEvictionIntervalInMs != CACHE_VALUE_NOT_SET) {cacheBuilder.expireAfterAccess(cacheEvictionIntervalInMs, TimeUnit.MILLISECONDS);}@@ -951,7 +951,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations(Long)propertiesMetadata.catalogPropertiesMetadata()- .getOrDefault(config, HadoopCatalogPropertiesMetadata.FILESET_CACHE_MAX_SIZE);+ .getOrDefault(config, FilesetCatalogPropertiesMetadata.FILESET_CACHE_MAX_SIZE);if (cacheMaxSize != CACHE_VALUE_NOT_SET) {cacheBuilder.maximumSize(cacheMaxSize);}@@ -959,42 +959,6 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsreturn cacheBuilder.build();}- private SchemaEntity updateSchemaEntity(- NameIdentifier ident, SchemaEntity schemaEntity, SchemaChange... changes) {- Map<String, String> props =- schemaEntity.properties() == null- ? Maps.newHashMap()- : Maps.newHashMap(schemaEntity.properties());-- for (SchemaChange change : changes) {- if (change instanceof SchemaChange.SetProperty) {- SchemaChange.SetProperty setProperty = (SchemaChange.SetProperty) change;- props.put(setProperty.getProperty(), setProperty.getValue());- } else if (change instanceof SchemaChange.RemoveProperty) {- SchemaChange.RemoveProperty removeProperty = (SchemaChange.RemoveProperty) change;- props.remove(removeProperty.getProperty());- } else {- throw new IllegalArgumentException(- "Unsupported schema change: " + change.getClass().getSimpleName());- }- }-- return SchemaEntity.builder()- .withName(schemaEntity.name())- .withNamespace(ident.namespace())- .withId(schemaEntity.id())- .withComment(schemaEntity.comment())- .withProperties(props)- .withAuditInfo(- AuditInfo.builder()- .withCreator(schemaEntity.auditInfo().creator())- .withCreateTime(schemaEntity.auditInfo().createTime())- .withLastModifier(PrincipalUtils.getCurrentPrincipal().getName())- .withLastModifiedTime(Instant.now())- .build())- .build();- }-private void validateLocationHierarchy(Map<String, String> schemaLocations, Map<String, String> filesetLocations) {if (schemaLocations == null@@ -1027,11 +991,11 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations}private Map<String, Path> getAndCheckCatalogStorageLocations(Map<String, String> properties) {- if (existBlankValue(properties, HadoopCatalogPropertiesMetadata.LOCATION)) {+ if (existBlankValue(properties, FilesetCatalogPropertiesMetadata.LOCATION)) {// If the properties contain the catalog property "location", it must not be blank.throw new IllegalArgumentException("The value of the catalog property "- + HadoopCatalogPropertiesMetadata.LOCATION+ + FilesetCatalogPropertiesMetadata.LOCATION+ " must not be blank");}@@ -1040,7 +1004,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations(String)propertiesMetadata.catalogPropertiesMetadata()- .getOrDefault(properties, HadoopCatalogPropertiesMetadata.LOCATION);+ .getOrDefault(properties, FilesetCatalogPropertiesMetadata.LOCATION);if (StringUtils.isNotBlank(unnamedLocation)) {checkPlaceholderValue(unnamedLocation);catalogStorageLocations.put(@@ -1069,11 +1033,11 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsprivate Map<String, Path> getAndCheckSchemaPaths(String schemaName, Map<String, String> schemaProps) {- if (existBlankValue(schemaProps, HadoopSchemaPropertiesMetadata.LOCATION)) {+ if (existBlankValue(schemaProps, FilesetSchemaPropertiesMetadata.LOCATION)) {// If the properties contain the schema property "location", it must not be blank.throw new IllegalArgumentException("The value of the schema property "- + HadoopSchemaPropertiesMetadata.LOCATION+ + FilesetSchemaPropertiesMetadata.LOCATION+ " must not be blank");}@@ -1091,7 +1055,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperations(String)propertiesMetadata.schemaPropertiesMetadata()- .getOrDefault(schemaProps, HadoopSchemaPropertiesMetadata.LOCATION);+ .getOrDefault(schemaProps, FilesetSchemaPropertiesMetadata.LOCATION);checkPlaceholderValue(unnamedSchemaLocation);Optional.ofNullable(unnamedSchemaLocation).map(this::ensureTrailingSlash)@@ -1357,7 +1321,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationspropertiesMetadata.catalogPropertiesMetadata().getOrDefault(- config, HadoopCatalogPropertiesMetadata.FILESYSTEM_CONNECTION_TIMEOUT_SECONDS);+ config, FilesetCatalogPropertiesMetadata.FILESYSTEM_CONNECTION_TIMEOUT_SECONDS);try {AtomicReference<FileSystem> fileSystem = new AtomicReference<>();Awaitility.await()@@ -1380,7 +1344,7 @@ public class HadoopCatalogOperations extends ManagedSchemaOperationsprovider,config,timeoutSeconds,- HadoopCatalogPropertiesMetadata.FILESYSTEM_CONNECTION_TIMEOUT_SECONDS),+ FilesetCatalogPropertiesMetadata.FILESYSTEM_CONNECTION_TIMEOUT_SECONDS),e);}}diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogPropertiesMetadata.javasimilarity index 91%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogPropertiesMetadata.javaindex 1c9d566b17..e4dc00b0ce 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetCatalogPropertiesMetadata.java@@ -16,25 +16,25 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.KERBEROS_PROPERTY_ENTRIES;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.KERBEROS_PROPERTY_ENTRIES;import static org.apache.gravitino.catalog.hadoop.fs.Constants.BUILTIN_LOCAL_FS_PROVIDER;import static org.apache.gravitino.file.Fileset.LOCATION_NAME_UNKNOWN;import static org.apache.gravitino.file.Fileset.PROPERTY_MULTIPLE_LOCATIONS_PREFIX;import com.google.common.collect.ImmutableMap;import java.util.Map;-import org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig;+import org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig;import org.apache.gravitino.catalog.hadoop.fs.FileSystemProvider;import org.apache.gravitino.catalog.hadoop.fs.LocalFileSystemProvider;import org.apache.gravitino.connector.BaseCatalogPropertiesMetadata;import org.apache.gravitino.connector.PropertyEntry;import org.apache.gravitino.credential.config.CredentialConfig;-public class HadoopCatalogPropertiesMetadata extends BaseCatalogPropertiesMetadata {+public class FilesetCatalogPropertiesMetadata extends BaseCatalogPropertiesMetadata {- // Property "location" is used to specify the storage location managed by Hadoop fileset catalog.+ // Property "location" is used to specify the storage location managed by fileset catalog.// If specified, the location will be used as the default storage location for all// managed filesets created under this catalog.//@@ -78,13 +78,13 @@ public class HadoopCatalogPropertiesMetadata extends BaseCatalogPropertiesMetadastatic final boolean DEFAULT_DISABLE_FILESYSTEM_OPS = false;- private static final Map<String, PropertyEntry<?>> HADOOP_CATALOG_PROPERTY_ENTRIES =+ private static final Map<String, PropertyEntry<?>> FILESET_CATALOG_PROPERTY_ENTRIES =ImmutableMap.<String, PropertyEntry<?>>builder().put(LOCATION,PropertyEntry.stringOptionalPropertyEntry(LOCATION,- "The storage location managed by Hadoop fileset catalog",+ "The storage location managed by fileset catalog",false /* immutable */,null,false /* hidden */))@@ -123,7 +123,7 @@ public class HadoopCatalogPropertiesMetadata extends BaseCatalogPropertiesMetadaFILESYSTEM_CONNECTION_TIMEOUT_SECONDS,PropertyEntry.integerOptionalPropertyEntry(FILESYSTEM_CONNECTION_TIMEOUT_SECONDS,- "Timeout to wait for to create the Hadoop file system client instance.",+ "Timeout to wait for to create the HCFS file system client instance.",false /* immutable */,DEFAULT_GET_FILESYSTEM_TIMEOUT_SECONDS,false /* hidden */))@@ -161,6 +161,6 @@ public class HadoopCatalogPropertiesMetadata extends BaseCatalogPropertiesMetada@Overrideprotected Map<String, PropertyEntry<?>> specificPropertyEntries() {- return HADOOP_CATALOG_PROPERTY_ENTRIES;+ return FILESET_CATALOG_PROPERTY_ENTRIES;}}diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopFileset.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetImpl.javasimilarity index 87%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopFileset.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetImpl.javaindex 6d622cf1d0..5f6852bcb3 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopFileset.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetImpl.java@@ -16,19 +16,19 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import org.apache.gravitino.connector.BaseFileset;-public class HadoopFileset extends BaseFileset {+public class FilesetImpl extends BaseFileset {- public static class Builder extends BaseFilesetBuilder<Builder, HadoopFileset> {+ public static class Builder extends BaseFilesetBuilder<Builder, FilesetImpl> {/** Creates a new instance of {@link Builder}. */private Builder() {}@Override- protected HadoopFileset internalBuild() {- HadoopFileset fileset = new HadoopFileset();+ protected FilesetImpl internalBuild() {+ FilesetImpl fileset = new FilesetImpl();fileset.name = name;fileset.comment = comment;fileset.storageLocations = storageLocations;diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopFilesetPropertiesMetadata.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetPropertiesMetadata.javasimilarity index 92%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopFilesetPropertiesMetadata.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetPropertiesMetadata.javaindex 1f6f578f76..c52f922f35 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopFilesetPropertiesMetadata.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetPropertiesMetadata.java@@ -16,7 +16,7 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import static org.apache.gravitino.file.Fileset.PROPERTY_CATALOG_PLACEHOLDER;import static org.apache.gravitino.file.Fileset.PROPERTY_DEFAULT_LOCATION_NAME;@@ -26,13 +26,13 @@ import static org.apache.gravitino.file.Fileset.PROPERTY_SCHEMA_PLACEHOLDER;import com.google.common.collect.ImmutableMap;import java.util.Map;-import org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig;-import org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig;+import org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig;+import org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig;import org.apache.gravitino.connector.BasePropertiesMetadata;import org.apache.gravitino.connector.PropertyEntry;import org.apache.gravitino.credential.config.CredentialConfig;-public class HadoopFilesetPropertiesMetadata extends BasePropertiesMetadata {+public class FilesetPropertiesMetadata extends BasePropertiesMetadata {@Overrideprotected Map<String, PropertyEntry<?>> specificPropertyEntries() {diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopSchemaPropertiesMetadata.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetSchemaPropertiesMetadata.javasimilarity index 86%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopSchemaPropertiesMetadata.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetSchemaPropertiesMetadata.javaindex 5cc0940292..35d0c34bba 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopSchemaPropertiesMetadata.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/FilesetSchemaPropertiesMetadata.java@@ -16,20 +16,20 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import static org.apache.gravitino.file.Fileset.LOCATION_NAME_UNKNOWN;import static org.apache.gravitino.file.Fileset.PROPERTY_MULTIPLE_LOCATIONS_PREFIX;import com.google.common.collect.ImmutableMap;import java.util.Map;-import org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig;-import org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig;+import org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig;+import org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig;import org.apache.gravitino.connector.BasePropertiesMetadata;import org.apache.gravitino.connector.PropertyEntry;import org.apache.gravitino.credential.config.CredentialConfig;-public class HadoopSchemaPropertiesMetadata extends BasePropertiesMetadata {+public class FilesetSchemaPropertiesMetadata extends BasePropertiesMetadata {// Property "location" is used to specify the schema's storage location managed by Hadoop fileset// catalog.@@ -41,13 +41,13 @@ public class HadoopSchemaPropertiesMetadata extends BasePropertiesMetadata {// specified), or users have to specify the storage location in the Fileset level.public static final String LOCATION = "location";- private static final Map<String, PropertyEntry<?>> HADOOP_SCHEMA_ENTRIES =+ private static final Map<String, PropertyEntry<?>> FILESET_SCHEMA_ENTRIES =ImmutableMap.<String, PropertyEntry<?>>builder().put(LOCATION,PropertyEntry.stringOptionalPropertyEntry(LOCATION,- "The storage location managed by Hadoop schema",+ "The storage location managed by Fileset schema",true /* immutable */,null,false /* hidden */))@@ -73,6 +73,6 @@ public class HadoopSchemaPropertiesMetadata extends BasePropertiesMetadata {@Overrideprotected Map<String, PropertyEntry<?>> specificPropertyEntries() {- return HADOOP_SCHEMA_ENTRIES;+ return FILESET_SCHEMA_ENTRIES;}}diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/SecureHadoopCatalogOperations.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/SecureFilesetCatalogOperations.javasimilarity index 83%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/SecureHadoopCatalogOperations.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/SecureFilesetCatalogOperations.javaindex 4235c14036..d79025124d 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/SecureHadoopCatalogOperations.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/SecureFilesetCatalogOperations.java@@ -17,7 +17,7 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import static org.apache.gravitino.file.Fileset.PROPERTY_DEFAULT_LOCATION_NAME;@@ -42,7 +42,7 @@ import org.apache.gravitino.SchemaChange;import org.apache.gravitino.UserPrincipal;import org.apache.gravitino.audit.CallerContext;import org.apache.gravitino.catalog.FilesetFileOps;-import org.apache.gravitino.catalog.hadoop.authentication.UserContext;+import org.apache.gravitino.catalog.fileset.authentication.UserContext;import org.apache.gravitino.connector.CatalogInfo;import org.apache.gravitino.connector.CatalogOperations;import org.apache.gravitino.connector.HasPropertyMetadata;@@ -71,16 +71,16 @@ import org.slf4j.Logger;import org.slf4j.LoggerFactory;@SuppressWarnings("removal")-public class SecureHadoopCatalogOperations+public class SecureFilesetCatalogOperationsimplements CatalogOperations,SupportsSchemas,FilesetCatalog,FilesetFileOps,SupportsPathBasedCredentials {- public static final Logger LOG = LoggerFactory.getLogger(SecureHadoopCatalogOperations.class);+ public static final Logger LOG = LoggerFactory.getLogger(SecureFilesetCatalogOperations.class);- private final HadoopCatalogOperations hadoopCatalogOperations;+ private final FilesetCatalogOperations filesetCatalogOperations;public static final String GRAVITINO_KEYTAB_FORMAT = "keytabs/gravitino-%s";@@ -88,31 +88,31 @@ public class SecureHadoopCatalogOperationsprivate Map<String, String> catalogProperties;- public SecureHadoopCatalogOperations() {- this.hadoopCatalogOperations = new HadoopCatalogOperations();+ public SecureFilesetCatalogOperations() {+ this.filesetCatalogOperations = new FilesetCatalogOperations();}- public SecureHadoopCatalogOperations(EntityStore store) {- this.hadoopCatalogOperations = new HadoopCatalogOperations(store);+ public SecureFilesetCatalogOperations(EntityStore store) {+ this.filesetCatalogOperations = new FilesetCatalogOperations(store);}@Overridepublic void initialize(Map<String, String> config, CatalogInfo info, HasPropertyMetadata propertiesMetadata)throws RuntimeException {- hadoopCatalogOperations.initialize(config, info, propertiesMetadata);+ filesetCatalogOperations.initialize(config, info, propertiesMetadata);this.catalogUserContext =UserContext.getUserContext(NameIdentifier.of(info.namespace(), info.name()),config,- hadoopCatalogOperations.getHadoopConf(),+ filesetCatalogOperations.getHadoopConf(),info);this.catalogProperties = info.properties();}@VisibleForTesting- public HadoopCatalogOperations getBaseHadoopCatalogOperations() {- return hadoopCatalogOperations;+ public FilesetCatalogOperations getBaseFilesetCatalogOperations() {+ return filesetCatalogOperations;}@Override@@ -127,11 +127,11 @@ public class SecureHadoopCatalogOperationsUserContext userContext =UserContext.getUserContext(- ident, properties, null, hadoopCatalogOperations.getCatalogInfo());+ ident, properties, null, filesetCatalogOperations.getCatalogInfo());return userContext.doAs(() -> {setUser(apiUser);- return hadoopCatalogOperations.createMultipleLocationFileset(+ return filesetCatalogOperations.createMultipleLocationFileset(ident, comment, type, storageLocations, properties);},ident);@@ -142,7 +142,7 @@ public class SecureHadoopCatalogOperationsFilesetEntity filesetEntity;try {filesetEntity =- hadoopCatalogOperations+ filesetCatalogOperations.store().get(ident, Entity.EntityType.FILESET, FilesetEntity.class);} catch (NoSuchEntityException e) {@@ -154,8 +154,8 @@ public class SecureHadoopCatalogOperationsUserContext userContext =UserContext.getUserContext(- ident, filesetEntity.properties(), null, hadoopCatalogOperations.getCatalogInfo());- boolean r = userContext.doAs(() -> hadoopCatalogOperations.dropFileset(ident), ident);+ ident, filesetEntity.properties(), null, filesetCatalogOperations.getCatalogInfo());+ boolean r = userContext.doAs(() -> filesetCatalogOperations.dropFileset(ident), ident);UserContext.clearUserContext(ident);return r;}@@ -166,11 +166,11 @@ public class SecureHadoopCatalogOperationsString apiUser = PrincipalUtils.getCurrentUserName();UserContext userContext =UserContext.getUserContext(- ident, properties, null, hadoopCatalogOperations.getCatalogInfo());+ ident, properties, null, filesetCatalogOperations.getCatalogInfo());return userContext.doAs(() -> {setUser(apiUser);- return hadoopCatalogOperations.createSchema(ident, comment, properties);+ return filesetCatalogOperations.createSchema(ident, comment, properties);},ident);}@@ -179,14 +179,15 @@ public class SecureHadoopCatalogOperationspublic boolean dropSchema(NameIdentifier ident, boolean cascade) throws NonEmptySchemaException {try {SchemaEntity schemaEntity =- hadoopCatalogOperations.store().get(ident, Entity.EntityType.SCHEMA, SchemaEntity.class);+ filesetCatalogOperations.store().get(ident, Entity.EntityType.SCHEMA, SchemaEntity.class);Map<String, String> properties =Optional.ofNullable(schemaEntity.properties()).orElse(Collections.emptyMap());UserContext userContext =UserContext.getUserContext(- ident, properties, null, hadoopCatalogOperations.getCatalogInfo());- boolean r = userContext.doAs(() -> hadoopCatalogOperations.dropSchema(ident, cascade), ident);+ ident, properties, null, filesetCatalogOperations.getCatalogInfo());+ boolean r =+ userContext.doAs(() -> filesetCatalogOperations.dropSchema(ident, cascade), ident);UserContext.clearUserContext(ident);return r;@@ -202,7 +203,7 @@ public class SecureHadoopCatalogOperations@Overridepublic Fileset alterFileset(NameIdentifier ident, FilesetChange... changes)throws NoSuchFilesetException, IllegalArgumentException {- Fileset fileset = hadoopCatalogOperations.alterFileset(ident, changes);+ Fileset fileset = filesetCatalogOperations.alterFileset(ident, changes);String finalName = ident.name();for (FilesetChange change : changes) {@@ -219,45 +220,45 @@ public class SecureHadoopCatalogOperations@Overridepublic NameIdentifier[] listSchemas(Namespace namespace) throws NoSuchCatalogException {- return hadoopCatalogOperations.listSchemas(namespace);+ return filesetCatalogOperations.listSchemas(namespace);}@Overridepublic Schema loadSchema(NameIdentifier ident) throws NoSuchSchemaException {- return hadoopCatalogOperations.loadSchema(ident);+ return filesetCatalogOperations.loadSchema(ident);}@Overridepublic Schema alterSchema(NameIdentifier ident, SchemaChange... changes)throws NoSuchSchemaException {- return hadoopCatalogOperations.alterSchema(ident, changes);+ return filesetCatalogOperations.alterSchema(ident, changes);}@Overridepublic NameIdentifier[] listFilesets(Namespace namespace) throws NoSuchSchemaException {- return hadoopCatalogOperations.listFilesets(namespace);+ return filesetCatalogOperations.listFilesets(namespace);}@Overridepublic FileInfo[] listFiles(NameIdentifier ident, String locationName, String subPath)throws NoSuchFilesetException, IOException {- return hadoopCatalogOperations.listFiles(ident, locationName, subPath);+ return filesetCatalogOperations.listFiles(ident, locationName, subPath);}@Overridepublic Fileset loadFileset(NameIdentifier ident) throws NoSuchFilesetException {- return hadoopCatalogOperations.loadFileset(ident);+ return filesetCatalogOperations.loadFileset(ident);}@Overridepublic String getFileLocation(NameIdentifier ident, String subPath, String locationName)throws NoSuchFilesetException, NoSuchLocationNameException {- return hadoopCatalogOperations.getFileLocation(ident, subPath, locationName);+ return filesetCatalogOperations.getFileLocation(ident, subPath, locationName);}@Overridepublic void close() throws IOException {- hadoopCatalogOperations.close();+ filesetCatalogOperations.close();catalogUserContext.close();@@ -271,7 +272,7 @@ public class SecureHadoopCatalogOperationsString provider,String comment,Map<String, String> properties) {- hadoopCatalogOperations.testConnection(catalogIdent, type, provider, comment, properties);+ filesetCatalogOperations.testConnection(catalogIdent, type, provider, comment, properties);}@Override@@ -343,7 +344,7 @@ public class SecureHadoopCatalogOperations}/**- * Add the user to the subject so that we can get the last user in the subject. Hadoop catalog+ * Add the user to the subject so that we can get the last user in the subject. Fileset catalog* uses this method to pass api user from the client side, so that we can get the user in the* subject. Please do not mix it with UserGroupInformation.getCurrentUser().*diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/AuthenticationConfig.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/AuthenticationConfig.javasimilarity index 87%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/AuthenticationConfig.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/AuthenticationConfig.javaindex a5844ab390..ea7778aa3c 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/AuthenticationConfig.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/AuthenticationConfig.java@@ -17,7 +17,7 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication;+package org.apache.gravitino.catalog.fileset.authentication;import com.google.common.collect.ImmutableMap;import java.util.Map;@@ -53,14 +53,15 @@ public class AuthenticationConfig extends Config {public static final ConfigEntry<String> AUTH_TYPE_ENTRY =new ConfigBuilder(AUTH_TYPE_KEY).doc(- "The type of authentication for Hadoop catalog, currently we only support simple and Kerberos")+ "The type of authentication for Fileset catalog, currently we only support simple "+ + "and Kerberos").version(ConfigConstants.VERSION_0_5_1).stringConf().createWithDefault("simple");public static final ConfigEntry<Boolean> ENABLE_IMPERSONATION_ENTRY =new ConfigBuilder(IMPERSONATION_ENABLE_KEY)- .doc("Whether to enable impersonation for the Hadoop catalog")+ .doc("Whether to enable impersonation for the Fileset catalog").version(ConfigConstants.VERSION_0_5_1).booleanConf().createWithDefault(KERBEROS_DEFAULT_IMPERSONATION_ENABLE);@@ -87,7 +88,7 @@ public class AuthenticationConfig extends Config {IMPERSONATION_ENABLE_KEY,PropertyEntry.booleanPropertyEntry(IMPERSONATION_ENABLE_KEY,- "Whether to enable impersonation for the Hadoop catalog",+ "Whether to enable impersonation for the Fileset catalog",false /* required */,true /* immutable */,KERBEROS_DEFAULT_IMPERSONATION_ENABLE /* default value */,@@ -97,7 +98,8 @@ public class AuthenticationConfig extends Config {AUTH_TYPE_KEY,PropertyEntry.stringOptionalPropertyEntry(AUTH_TYPE_KEY,- "The type of authentication for Hadoop catalog, currently we only support simple and Kerberos",+ "The type of authentication for Fileset catalog, currently we only "+ + "support simple and Kerberos",false /* immutable */,null /* default value */,false /* hidden */))diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/KerberosUserContext.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/KerberosUserContext.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/KerberosUserContext.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/KerberosUserContext.javaindex e6bffe984f..03a428f6cd 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/KerberosUserContext.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/KerberosUserContext.java@@ -17,7 +17,7 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication;+package org.apache.gravitino.catalog.fileset.authentication;import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION;@@ -25,7 +25,7 @@ import java.io.File;import java.io.IOException;import java.util.Locale;import java.util.Map;-import org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosClient;+import org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosClient;import org.apache.gravitino.utils.PrincipalUtils;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.security.UserGroupInformation;diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/SimpleUserContext.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/SimpleUserContext.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/SimpleUserContext.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/SimpleUserContext.javaindex 7176f40552..3ffa58fdb5 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/SimpleUserContext.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/SimpleUserContext.java@@ -17,7 +17,7 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication;+package org.apache.gravitino.catalog.fileset.authentication;import java.io.IOException;import org.apache.gravitino.utils.PrincipalUtils;diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/UserContext.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/UserContext.javasimilarity index 91%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/UserContext.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/UserContext.javaindex 3bf84adbbe..9985c8164d 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/UserContext.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/UserContext.java@@ -17,12 +17,12 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication;+package org.apache.gravitino.catalog.fileset.authentication;-import static org.apache.gravitino.catalog.hadoop.SecureHadoopCatalogOperations.GRAVITINO_KEYTAB_FORMAT;-import static org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig.AUTH_TYPE_ENTRY;-import static org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig.ENABLE_IMPERSONATION_ENTRY;-import static org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig.IMPERSONATION_ENABLE_KEY;+import static org.apache.gravitino.catalog.fileset.SecureFilesetCatalogOperations.GRAVITINO_KEYTAB_FORMAT;+import static org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig.AUTH_TYPE_ENTRY;+import static org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig.ENABLE_IMPERSONATION_ENTRY;+import static org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig.IMPERSONATION_ENABLE_KEY;import com.google.common.collect.Maps;import java.io.Closeable;@@ -33,7 +33,7 @@ import java.security.PrivilegedActionException;import java.security.PrivilegedExceptionAction;import java.util.Map;import org.apache.gravitino.NameIdentifier;-import org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig.AuthenticationType;+import org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig.AuthenticationType;import org.apache.gravitino.connector.CatalogInfo;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.security.UserGroupInformation;diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/FetchFileUtils.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/FetchFileUtils.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/FetchFileUtils.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/FetchFileUtils.javaindex 4610e711a0..dbd66cfa10 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/FetchFileUtils.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/FetchFileUtils.java@@ -16,7 +16,7 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication.kerberos;+package org.apache.gravitino.catalog.fileset.authentication.kerberos;import java.io.File;import java.io.IOException;diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/KerberosClient.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/KerberosClient.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/KerberosClient.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/KerberosClient.javaindex 4ea2fbdd9d..9a839f2ac0 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/KerberosClient.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/KerberosClient.java@@ -17,7 +17,7 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication.kerberos;+package org.apache.gravitino.catalog.fileset.authentication.kerberos;import com.google.common.base.Preconditions;import com.google.common.base.Splitter;@@ -99,7 +99,7 @@ public class KerberosClient implements Closeable {java.io.File keytabsDir = new File("keytabs");if (!keytabsDir.exists()) {- // Ignore the return value, because there exists many Hadoop catalog operations making+ // Ignore the return value, because there exists many Fileset catalog operations making// this directory.keytabsDir.mkdir();}diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/KerberosConfig.java b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/KerberosConfig.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/KerberosConfig.javarename to catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/KerberosConfig.javaindex d2c43d6767..b3bb56375f 100644--- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/authentication/kerberos/KerberosConfig.java+++ b/catalogs/catalog-fileset/src/main/java/org/apache/gravitino/catalog/fileset/authentication/kerberos/KerberosConfig.java@@ -17,12 +17,12 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.authentication.kerberos;+package org.apache.gravitino.catalog.fileset.authentication.kerberos;import com.google.common.collect.ImmutableMap;import java.util.Map;import org.apache.commons.lang3.StringUtils;-import org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig;+import org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig;import org.apache.gravitino.config.ConfigBuilder;import org.apache.gravitino.config.ConfigConstants;import org.apache.gravitino.config.ConfigEntry;@@ -56,7 +56,7 @@ public class KerberosConfig extends AuthenticationConfig {public static final ConfigEntry<Integer> CHECK_INTERVAL_SEC_ENTRY =new ConfigBuilder(CHECK_INTERVAL_SEC_KEY)- .doc("The check interval of the Kerberos connection for Hadoop catalog")+ .doc("The check interval of the Kerberos connection for Fileset catalog").version(ConfigConstants.VERSION_0_5_1).intConf().checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)diff --git a/catalogs/catalog-hadoop/src/main/resources/META-INF/services/org.apache.gravitino.CatalogProvider b/catalogs/catalog-fileset/src/main/resources/META-INF/services/org.apache.gravitino.CatalogProvidersimilarity index 93%rename from catalogs/catalog-hadoop/src/main/resources/META-INF/services/org.apache.gravitino.CatalogProviderrename to catalogs/catalog-fileset/src/main/resources/META-INF/services/org.apache.gravitino.CatalogProviderindex f46d2bedf6..ebe8445dad 100644--- a/catalogs/catalog-hadoop/src/main/resources/META-INF/services/org.apache.gravitino.CatalogProvider+++ b/catalogs/catalog-fileset/src/main/resources/META-INF/services/org.apache.gravitino.CatalogProvider@@ -16,4 +16,4 @@# specific language governing permissions and limitations# under the License.#-org.apache.gravitino.catalog.hadoop.HadoopCatalog+org.apache.gravitino.catalog.fileset.FilesetCatalogImpldiff --git a/catalogs/catalog-hadoop/src/main/resources/core-site.xml.template b/catalogs/catalog-fileset/src/main/resources/core-site.xml.templatesimilarity index 100%rename from catalogs/catalog-hadoop/src/main/resources/core-site.xml.templaterename to catalogs/catalog-fileset/src/main/resources/core-site.xml.templatediff --git a/catalogs/catalog-hadoop/src/main/resources/hadoop.conf b/catalogs/catalog-fileset/src/main/resources/fileset.confsimilarity index 100%rename from catalogs/catalog-hadoop/src/main/resources/hadoop.confrename to catalogs/catalog-fileset/src/main/resources/fileset.confdiff --git a/catalogs/catalog-hadoop/src/main/resources/hdfs-site.xml.template b/catalogs/catalog-fileset/src/main/resources/hdfs-site.xml.templatesimilarity index 100%rename from catalogs/catalog-hadoop/src/main/resources/hdfs-site.xml.templaterename to catalogs/catalog-fileset/src/main/resources/hdfs-site.xml.templatediff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/TestHadoopCatalogOperations.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/TestFilesetCatalogOperations.javasimilarity index 94%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/TestHadoopCatalogOperations.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/TestFilesetCatalogOperations.javaindex 35c34a07db..e3d7a95ca7 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/TestHadoopCatalogOperations.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/TestFilesetCatalogOperations.java@@ -16,7 +16,7 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop;+package org.apache.gravitino.catalog.fileset;import static org.apache.gravitino.Configs.DEFAULT_ENTITY_RELATIONAL_STORE;import static org.apache.gravitino.Configs.ENTITY_RELATIONAL_JDBC_BACKEND_DRIVER;@@ -32,11 +32,11 @@ import static org.apache.gravitino.Configs.RELATIONAL_ENTITY_STORE;import static org.apache.gravitino.Configs.STORE_DELETE_AFTER_TIME;import static org.apache.gravitino.Configs.STORE_TRANSACTION_MAX_SKEW_TIME;import static org.apache.gravitino.Configs.VERSION_RETENTION_COUNT;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalog.CATALOG_PROPERTIES_META;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalog.FILESET_PROPERTIES_META;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalog.SCHEMA_PROPERTIES_META;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.DISABLE_FILESYSTEM_OPS;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.LOCATION;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogImpl.CATALOG_PROPERTIES_META;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogImpl.FILESET_PROPERTIES_META;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogImpl.SCHEMA_PROPERTIES_META;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.DISABLE_FILESYSTEM_OPS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.LOCATION;import static org.apache.gravitino.file.Fileset.LOCATION_NAME_UNKNOWN;import static org.apache.gravitino.file.Fileset.PROPERTY_DEFAULT_LOCATION_NAME;import static org.apache.gravitino.file.Fileset.PROPERTY_MULTIPLE_LOCATIONS_PREFIX;@@ -109,7 +109,7 @@ import org.junit.jupiter.params.provider.MethodSource;import org.mockito.MockedStatic;import org.mockito.Mockito;-public class TestHadoopCatalogOperations {+public class TestFilesetCatalogOperations {private static final String STORE_PATH ="/tmp/gravitino_test_entityStore_" + UUID.randomUUID().toString().replace("-", "");@@ -120,7 +120,7 @@ public class TestHadoopCatalogOperations {private static final String TEST_ROOT_PATH = "file:" + UNFORMALIZED_TEST_ROOT_PATH;- private static final HasPropertyMetadata HADOOP_PROPERTIES_METADATA =+ private static final HasPropertyMetadata FILESET_PROPERTIES_METADATA =new HasPropertyMetadata() {@Overridepublic PropertiesMetadata tablePropertiesMetadata() throws UnsupportedOperationException {@@ -175,7 +175,7 @@ public class TestHadoopCatalogOperations {idGenerator.nextId(),catalogName,CatalogInfo.Type.FILESET,- "hadoop",+ "fileset","comment1",Maps.newHashMap(),null,@@ -188,7 +188,7 @@ public class TestHadoopCatalogOperations {idGenerator.nextId(),catalogName,CatalogInfo.Type.FILESET,- "hadoop",+ "fileset","comment1",props,null,@@ -329,27 +329,27 @@ public class TestHadoopCatalogOperations {}@Test- public void testHadoopCatalogConfiguration() {+ public void testFilesetCatalogConfiguration() {Map<String, String> emptyProps = Maps.newHashMap();- SecureHadoopCatalogOperations secOps = new SecureHadoopCatalogOperations(store);+ SecureFilesetCatalogOperations secOps = new SecureFilesetCatalogOperations(store);- HadoopCatalogOperations ops = secOps.getBaseHadoopCatalogOperations();+ FilesetCatalogOperations ops = secOps.getBaseFilesetCatalogOperations();CatalogInfo catalogInfo = randomCatalogInfo();- ops.initialize(emptyProps, catalogInfo, HADOOP_PROPERTIES_METADATA);+ ops.initialize(emptyProps, catalogInfo, FILESET_PROPERTIES_METADATA);Configuration conf = ops.getHadoopConf();String value = conf.get("fs.defaultFS");Assertions.assertEquals("file:///", value);emptyProps.put(LOCATION, "file:///tmp/catalog");- ops.initialize(emptyProps, catalogInfo, HADOOP_PROPERTIES_METADATA);+ ops.initialize(emptyProps, catalogInfo, FILESET_PROPERTIES_METADATA);Assertions.assertEquals(1, ops.catalogStorageLocations.size());Path expectedPath = new Path("file:///tmp/catalog");Assertions.assertEquals(expectedPath, ops.catalogStorageLocations.get(LOCATION_NAME_UNKNOWN));// test placeholder in locationemptyProps.put(LOCATION, "file:///tmp/{{catalog}}");- ops.initialize(emptyProps, catalogInfo, HADOOP_PROPERTIES_METADATA);+ ops.initialize(emptyProps, catalogInfo, FILESET_PROPERTIES_METADATA);Assertions.assertEquals(1, ops.catalogStorageLocations.size());expectedPath = new Path("file:///tmp/{{catalog}}");Assertions.assertEquals(expectedPath, ops.catalogStorageLocations.get(LOCATION_NAME_UNKNOWN));@@ -359,7 +359,7 @@ public class TestHadoopCatalogOperations {Throwable exception =Assertions.assertThrows(IllegalArgumentException.class,- () -> ops.initialize(emptyProps, catalogInfo, HADOOP_PROPERTIES_METADATA));+ () -> ops.initialize(emptyProps, catalogInfo, FILESET_PROPERTIES_METADATA));Assertions.assertTrue(exception.getMessage().contains("Placeholder in location should not be empty"),exception.getMessage());@@ -395,7 +395,7 @@ public class TestHadoopCatalogOperations {() -> createSchema(testId, schemaName, comment, catalogPath, null));Assertions.assertEquals("The value of the catalog property "- + HadoopCatalogPropertiesMetadata.LOCATION+ + FilesetCatalogPropertiesMetadata.LOCATION+ " must not be blank",exception.getMessage());}@@ -538,8 +538,8 @@ public class TestHadoopCatalogOperations {Assertions.assertEquals(name, schema.name());- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Schema schema1 = ops.loadSchema(NameIdentifierUtil.ofSchema("m1", "c1", name));Assertions.assertEquals(name, schema1.name());Assertions.assertEquals(comment, schema1.comment());@@ -564,8 +564,8 @@ public class TestHadoopCatalogOperations {createSchema(testId1, name1, comment1, null, null);createSchema(testId2, name2, comment2, null, null);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Set<NameIdentifier> idents =Arrays.stream(ops.listSchemas(Namespace.of("m1", "c1"))).collect(Collectors.toSet());Assertions.assertTrue(idents.size() >= 2);@@ -583,8 +583,8 @@ public class TestHadoopCatalogOperations {Schema schema = createSchema(testId, name, comment, catalogPath, null);Assertions.assertEquals(name, schema.name());- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Schema schema1 = ops.loadSchema(NameIdentifierUtil.ofSchema("m1", "c1", name));Assertions.assertEquals(name, schema1.name());Assertions.assertEquals(comment, schema1.comment());@@ -632,11 +632,11 @@ public class TestHadoopCatalogOperations {Assertions.assertEquals(schemaName, schema.name());NameIdentifier id = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {ops.initialize(ImmutableMap.of(LOCATION, catalogPath),randomCatalogInfo("m1", "c1"),- HADOOP_PROPERTIES_METADATA);+ FILESET_PROPERTIES_METADATA);Schema schema1 = ops.loadSchema(id);Assertions.assertEquals(schemaName, schema1.name());Assertions.assertEquals(comment, schema1.comment());@@ -704,11 +704,11 @@ public class TestHadoopCatalogOperations {Assertions.assertEquals(schemaName, schema.name());NameIdentifier id = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {ops.initialize(ImmutableMap.of(LOCATION, catalogPath, DISABLE_FILESYSTEM_OPS, "true"),randomCatalogInfo("m1", "c1"),- HADOOP_PROPERTIES_METADATA);+ FILESET_PROPERTIES_METADATA);ops.dropSchema(id, false);@@ -746,8 +746,8 @@ public class TestHadoopCatalogOperations {}NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);if (!ops.schemaExists(schemaIdent)) {createSchema(generateTestId(), schemaName, comment, catalogPath, schemaPath);}@@ -803,8 +803,8 @@ public class TestHadoopCatalogOperations {}NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);if (!ops.schemaExists(schemaIdent)) {createSchema(generateTestId(), schemaName, comment, catalogPath, schemaPath, true);}@@ -879,8 +879,8 @@ public class TestHadoopCatalogOperations {+ " when it's catalog and schema "+ "location are not set",exception.getMessage());- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Throwable e =Assertions.assertThrows(NoSuchFilesetException.class, () -> ops.loadFileset(filesetIdent));@@ -898,8 +898,8 @@ public class TestHadoopCatalogOperations {Assertions.assertEquals("Storage location must be set for external fileset " + filesetIdent,exception1.getMessage());- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Throwable e =Assertions.assertThrows(NoSuchFilesetException.class, () -> ops.loadFileset(filesetIdent));@@ -923,8 +923,8 @@ public class TestHadoopCatalogOperations {createFileset(fileset, schemaName, comment, Fileset.Type.MANAGED, null, null);}- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Set<NameIdentifier> idents =Arrays.stream(ops.listFilesets(Namespace.of("m1", "c1", schemaName))).collect(Collectors.toSet());@@ -947,8 +947,8 @@ public class TestHadoopCatalogOperations {createSchema(testId, schemaName, comment, null, schemaPath);createFileset(filesetName, schemaName, comment, Fileset.Type.MANAGED, null, null);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);Path testDir = new Path(schemaPath + "/" + filesetName);FileSystem fs = testDir.getFileSystem(new Configuration());@@ -999,8 +999,8 @@ public class TestHadoopCatalogOperations {Map<String, String> catalogProps = Collections.singletonMap(DISABLE_FILESYSTEM_OPS, "true");- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogProps, randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogProps, randomCatalogInfo(), FILESET_PROPERTIES_METADATA);UnsupportedOperationException ex =Assertions.assertThrows(UnsupportedOperationException.class,@@ -1027,8 +1027,8 @@ public class TestHadoopCatalogOperations {final NameIdentifier filesetIdent =NameIdentifier.of("m1", "c1", schema.name(), fileset.name());- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);IllegalArgumentException ex =Assertions.assertThrows(IllegalArgumentException.class,@@ -1060,8 +1060,8 @@ public class TestHadoopCatalogOperations {}NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);if (!ops.schemaExists(schemaIdent)) {createSchema(generateTestId(), schemaName, comment, catalogPath, schemaPath);}@@ -1108,8 +1108,8 @@ public class TestHadoopCatalogOperations {FilesetChange change1 = FilesetChange.setProperty("k1", "v1");FilesetChange change2 = FilesetChange.removeProperty("k1");- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, filesetName);Fileset fileset1 = ops.alterFileset(filesetIdent, change1);@@ -1158,7 +1158,7 @@ public class TestHadoopCatalogOperations {return new PropertiesMetadata() {@Overridepublic Map<String, PropertyEntry<?>> propertyEntries() {- return new HadoopCatalogPropertiesMetadata().propertyEntries();+ return new FilesetCatalogPropertiesMetadata().propertyEntries();}};}@@ -1189,11 +1189,11 @@ public class TestHadoopCatalogOperations {try {FieldUtils.writeField(GravitinoEnv.getInstance(), "entityStore", new RelationalEntityStore(), true);- try (HadoopCatalogOperations hadoopCatalogOperations = new HadoopCatalogOperations()) {+ try (FilesetCatalogOperations filesetCatalogOperations = new FilesetCatalogOperations()) {Map<String, String> map = ImmutableMap.of("default-filesystem", "file:///");- hadoopCatalogOperations.initialize(map, null, hasPropertyMetadata);+ filesetCatalogOperations.initialize(map, null, hasPropertyMetadata);for (int i = 0; i < paths.length; i++) {- Path actual = hadoopCatalogOperations.formalizePath(new Path(paths[i]), map);+ Path actual = filesetCatalogOperations.formalizePath(new Path(paths[i]), map);Assertions.assertEquals(expected[i], actual.toString());}}@@ -1214,8 +1214,8 @@ public class TestHadoopCatalogOperations {Fileset fileset = createFileset(name, schemaName, comment, Fileset.Type.MANAGED, null, null);FilesetChange change1 = FilesetChange.updateComment(comment + "_new");- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, name);Fileset fileset1 = ops.alterFileset(filesetIdent, change1);@@ -1239,8 +1239,8 @@ public class TestHadoopCatalogOperations {createFileset(filesetName, schemaName, comment, Fileset.Type.MANAGED, null, null);FilesetChange change1 = FilesetChange.updateComment(null);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, filesetName);Fileset fileset1 = ops.alterFileset(filesetIdent, change1);@@ -1253,26 +1253,26 @@ public class TestHadoopCatalogOperations {@Testpublic void testTestConnection() {- SecureHadoopCatalogOperations catalogOperations = new SecureHadoopCatalogOperations(store);+ SecureFilesetCatalogOperations catalogOperations = new SecureFilesetCatalogOperations(store);Assertions.assertDoesNotThrow(() ->catalogOperations.testConnection(NameIdentifier.of("metalake", "catalog"),Catalog.Type.FILESET,- "hadoop",+ "fileset","comment",ImmutableMap.of()));}@Testvoid testTrailSlash() throws IOException {- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {String location = "hdfs://localhost:9000";Map<String, String> catalogProperties = Maps.newHashMap();catalogProperties.put(LOCATION, location);- ops.initialize(catalogProperties, randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ ops.initialize(catalogProperties, randomCatalogInfo(), FILESET_PROPERTIES_METADATA);String schemaName = "schema1024";NameIdentifier nameIdentifier = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);@@ -1313,8 +1313,8 @@ public class TestHadoopCatalogOperations {createFileset(filesetName, schemaName, comment, Fileset.Type.MANAGED, null, storageLocation);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, filesetName);// test sub path starts with "/"String subPath1 = "/test/test.parquet";@@ -1345,9 +1345,9 @@ public class TestHadoopCatalogOperations {TEST_ROOT_PATH + "/" + catalogName + "/" + schemaName + "/" + filesetName2;Path filesetLocationPath2 = new Path(filesetLocation2);createFileset(filesetName2, schemaName, comment, Fileset.Type.MANAGED, null, filesetLocation2);- try (HadoopCatalogOperations ops = new HadoopCatalogOperations(store);+ try (FilesetCatalogOperations ops = new FilesetCatalogOperations(store);FileSystem localFileSystem = filesetLocationPath2.getFileSystem(new Configuration())) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, filesetName2);// replace fileset location to a single fileAssertions.assertTrue(localFileSystem.exists(filesetLocationPath2));@@ -1377,9 +1377,9 @@ public class TestHadoopCatalogOperations {TEST_ROOT_PATH + "/" + catalogName + "/" + schemaName + "/" + filesetName3;Path filesetLocationPath3 = new Path(filesetLocation3);createFileset(filesetName3, schemaName, comment, Fileset.Type.MANAGED, null, filesetLocation3);- try (HadoopCatalogOperations ops = new HadoopCatalogOperations(store);+ try (FilesetCatalogOperations ops = new FilesetCatalogOperations(store);FileSystem localFileSystem = filesetLocationPath3.getFileSystem(new Configuration())) {- ops.initialize(Maps.newHashMap(), randomCatalogInfo(), HADOOP_PROPERTIES_METADATA);+ ops.initialize(Maps.newHashMap(), randomCatalogInfo(), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, filesetName3);// replace fileset location to a single fileAssertions.assertTrue(localFileSystem.exists(filesetLocationPath3));@@ -1412,7 +1412,7 @@ public class TestHadoopCatalogOperations {when(mockFileset.properties()).thenReturn(ImmutableMap.of(PROPERTY_DEFAULT_LOCATION_NAME, LOCATION_NAME_UNKNOWN));- try (HadoopCatalogOperations mockOps = Mockito.mock(HadoopCatalogOperations.class)) {+ try (FilesetCatalogOperations mockOps = Mockito.mock(FilesetCatalogOperations.class)) {mockOps.hadoopConf = new Configuration();when(mockOps.loadFileset(filesetIdent)).thenReturn(mockFileset);when(mockOps.getConf()).thenReturn(Maps.newHashMap());@@ -1489,8 +1489,8 @@ public class TestHadoopCatalogOperations {}NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogProps, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);if (!ops.schemaExists(schemaIdent)) {createSchema(generateTestId(), schemaName, comment, catalogPath, schemaPath);}@@ -1544,8 +1544,8 @@ public class TestHadoopCatalogOperations {String comment = "comment_s1";NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", schemaName);- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogPaths, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogPaths, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);if (!ops.schemaExists(schemaIdent)) {createMultiLocationSchema(schemaName, comment, catalogPaths, schemaPaths);}@@ -1612,17 +1612,19 @@ public class TestHadoopCatalogOperations {// empty location name in catalog locationMap<String, String> illegalLocations =ImmutableMap.of(PROPERTY_MULTIPLE_LOCATIONS_PREFIX + "", TEST_ROOT_PATH + "/catalog31_1");- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {Exception exception =Assertions.assertThrows(IllegalArgumentException.class,() ->ops.initialize(- illegalLocations, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA));+ illegalLocations,+ randomCatalogInfo("m1", "c1"),+ FILESET_PROPERTIES_METADATA));Assertions.assertEquals("Location name must not be blank", exception.getMessage());// empty location name in schema location- ops.initialize(ImmutableMap.of(), randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ ops.initialize(ImmutableMap.of(), randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);exception =Assertions.assertThrows(IllegalArgumentException.class,@@ -1659,7 +1661,7 @@ public class TestHadoopCatalogOperations {ops.initialize(illegalLocations2,randomCatalogInfo("m1", "c1"),- HADOOP_PROPERTIES_METADATA));+ FILESET_PROPERTIES_METADATA));Assertions.assertEquals("Location value must not be blank for location name: v1", exception.getMessage());@@ -1721,9 +1723,9 @@ public class TestHadoopCatalogOperations {@Testpublic void testGetTargetLocation() throws IOException {- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {ops.initialize(- Collections.emptyMap(), randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ Collections.emptyMap(), randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);Fileset fileset = Mockito.mock(Fileset.class);when(fileset.name()).thenReturn("fileset_single_location");@@ -2788,8 +2790,8 @@ public class TestHadoopCatalogOperations {props.put(LOCATION, catalogPath);}- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(props, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(props, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", name);Map<String, String> schemaProps = Maps.newHashMap();@@ -2797,7 +2799,7 @@ public class TestHadoopCatalogOperations {schemaProps = Maps.newHashMap(StringIdentifier.newPropertiesWithId(stringId, schemaProps));if (schemaPath != null) {- schemaProps.put(HadoopSchemaPropertiesMetadata.LOCATION, schemaPath);+ schemaProps.put(FilesetSchemaPropertiesMetadata.LOCATION, schemaPath);}return ops.createSchema(schemaIdent, comment, schemaProps);@@ -2810,8 +2812,8 @@ public class TestHadoopCatalogOperations {Map<String, String> catalogPaths,Map<String, String> schemaPaths)throws IOException {- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogPaths, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogPaths, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);NameIdentifier schemaIdent = NameIdentifierUtil.ofSchema("m1", "c1", name);Map<String, String> schemaProps = Maps.newHashMap();@@ -2832,8 +2834,8 @@ public class TestHadoopCatalogOperations {Map<String, String> storageLocations,Map<String, String> filesetProps)throws IOException {- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(catalogPaths, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(catalogPaths, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, name);StringIdentifier stringId = StringIdentifier.fromId(idGenerator.nextId());@@ -2871,8 +2873,8 @@ public class TestHadoopCatalogOperations {props.put(LOCATION, catalogPath);}- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(props, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(props, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, name);Map<String, String> filesetProps = Maps.newHashMap();@@ -2897,8 +2899,8 @@ public class TestHadoopCatalogOperations {props.put(LOCATION, catalogPath);}- try (SecureHadoopCatalogOperations ops = new SecureHadoopCatalogOperations(store)) {- ops.initialize(props, randomCatalogInfo("m1", "c1"), HADOOP_PROPERTIES_METADATA);+ try (SecureFilesetCatalogOperations ops = new SecureFilesetCatalogOperations(store)) {+ ops.initialize(props, randomCatalogInfo("m1", "c1"), FILESET_PROPERTIES_METADATA);NameIdentifier filesetIdent = NameIdentifier.of("m1", "c1", schemaName, name);filesetProps = filesetProps == null ? Maps.newHashMap() : filesetProps;diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/fs/TestFileSystemUtils.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/fs/TestFileSystemUtils.javasimilarity index 97%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/fs/TestFileSystemUtils.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/fs/TestFileSystemUtils.javaindex a035170368..769e5e25ad 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/fs/TestFileSystemUtils.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/fs/TestFileSystemUtils.java@@ -17,11 +17,12 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.fs;+package org.apache.gravitino.catalog.fileset.fs;import com.google.common.collect.ImmutableMap;import java.util.Map;import java.util.stream.Stream;+import org.apache.gravitino.catalog.hadoop.fs.FileSystemUtils;import org.apache.hadoop.conf.Configuration;import org.junit.jupiter.api.Assertions;import org.junit.jupiter.api.Test;diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopABSCatalogIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetABSCatalogIT.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopABSCatalogIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetABSCatalogIT.javaindex 482daba2e3..7651432cfe 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopABSCatalogIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetABSCatalogIT.java@@ -16,9 +16,9 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.ImmutableMap;import com.google.common.collect.Maps;@@ -42,7 +42,7 @@ import org.junit.jupiter.api.condition.EnabledIf;import org.junit.platform.commons.util.StringUtils;@EnabledIf("absIsConfigured")-public class HadoopABSCatalogIT extends HadoopCatalogIT {+public class FilesetABSCatalogIT extends FilesetCatalogIT {public static final String ABS_ACCOUNT_NAME = System.getenv("ABS_ACCOUNT_NAME");public static final String ABS_ACCOUNT_KEY = System.getenv("ABS_ACCOUNT_KEY");diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopCatalogIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetCatalogIT.javasimilarity index 99%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopCatalogIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetCatalogIT.javaindex dd17969482..66e3ac4ff9 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopCatalogIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetCatalogIT.java@@ -16,7 +16,7 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;import static org.apache.gravitino.file.Fileset.LOCATION_NAME_UNKNOWN;import static org.apache.gravitino.file.Fileset.PROPERTY_DEFAULT_LOCATION_NAME;@@ -75,8 +75,8 @@ import org.slf4j.Logger;import org.slf4j.LoggerFactory;@Tag("gravitino-docker-test")-public class HadoopCatalogIT extends BaseIT {- private static final Logger LOG = LoggerFactory.getLogger(HadoopCatalogIT.class);+public class FilesetCatalogIT extends BaseIT {+ private static final Logger LOG = LoggerFactory.getLogger(FilesetCatalogIT.class);protected static final ContainerSuite containerSuite = ContainerSuite.getInstance();protected String metalakeName = GravitinoITUtils.genRandomName("CatalogFilesetIT_metalake");@@ -215,7 +215,7 @@ public class HadoopCatalogIT extends BaseIT {@Testpublic void testFilesetCache() {- Assumptions.assumeTrue(getClass() == HadoopCatalogIT.class);+ Assumptions.assumeTrue(getClass() == FilesetCatalogIT.class);String catalogName = GravitinoITUtils.genRandomName("test_fileset_cache");String newCatalogName = catalogName + "_new";String filesetName = GravitinoITUtils.genRandomName("test_fileset_cache_fileset");@@ -285,7 +285,7 @@ public class HadoopCatalogIT extends BaseIT {@Testvoid testAlterCatalogLocation() throws IOException {- Assumptions.assumeTrue(getClass() == HadoopCatalogIT.class);+ Assumptions.assumeTrue(getClass() == FilesetCatalogIT.class);String catalogName = GravitinoITUtils.genRandomName("test_alter_catalog_location");String filesetName = "test_fileset1";String location = defaultBaseLocation();diff --git a/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetCatalogWithoutProviderIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetCatalogWithoutProviderIT.javanew file mode 100644index 0000000000..4f7c6dadad--- /dev/null+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetCatalogWithoutProviderIT.java@@ -0,0 +1,35 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one+ * or more contributor license agreements. See the NOTICE file+ * distributed with this work for additional information+ * regarding copyright ownership. The ASF licenses this file+ * to you under the Apache License, Version 2.0 (the+ * "License"); you may not use this file except in compliance+ * with the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing,+ * software distributed under the License is distributed on an+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+ * KIND, either express or implied. See the License for the+ * specific language governing permissions and limitations+ * under the License.+ */+package org.apache.gravitino.catalog.fileset.integration.test;++import com.google.common.collect.ImmutableMap;+import org.apache.gravitino.Catalog;+import org.junit.jupiter.api.Tag;++@Tag("gravitino-docker-test")+public class FilesetCatalogWithoutProviderIT extends FilesetCatalogIT {++ @Override+ protected void createCatalog() {+ metalake.createCatalog(+ catalogName, Catalog.Type.FILESET, "Fileset catalog without provider", ImmutableMap.of());++ catalog = metalake.loadCatalog(catalogName);+ }+}diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopGCSCatalogIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetGCSCatalogIT.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopGCSCatalogIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetGCSCatalogIT.javaindex 2a4c68ce55..cccff6021c 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopGCSCatalogIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetGCSCatalogIT.java@@ -16,9 +16,9 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import static org.apache.gravitino.storage.GCSProperties.GRAVITINO_GCS_SERVICE_ACCOUNT_FILE;import com.google.common.collect.ImmutableMap;@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;import org.junit.jupiter.api.condition.EnabledIf;@EnabledIf(value = "isGCPConfigured", disabledReason = "GCP is not configured.")-public class HadoopGCSCatalogIT extends HadoopCatalogIT {+public class FilesetGCSCatalogIT extends FilesetCatalogIT {public static final String BUCKET_NAME = System.getenv("GCS_BUCKET_NAME");public static final String SERVICE_ACCOUNT_FILE = System.getenv("GCS_SERVICE_ACCOUNT_JSON_PATH");diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopOSSCatalogIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetOSSCatalogIT.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopOSSCatalogIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetOSSCatalogIT.javaindex 123e4226f1..fc18eba99f 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopOSSCatalogIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetOSSCatalogIT.java@@ -16,9 +16,9 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.annotations.VisibleForTesting;import com.google.common.collect.ImmutableMap;@@ -45,8 +45,8 @@ import org.slf4j.Logger;import org.slf4j.LoggerFactory;@EnabledIf(value = "ossIsConfigured", disabledReason = "OSS is not configured.")-public class HadoopOSSCatalogIT extends HadoopCatalogIT {- private static final Logger LOG = LoggerFactory.getLogger(HadoopOSSCatalogIT.class);+public class FilesetOSSCatalogIT extends FilesetCatalogIT {+ private static final Logger LOG = LoggerFactory.getLogger(FilesetOSSCatalogIT.class);public static final String BUCKET_NAME = System.getenv("OSS_BUCKET_NAME");public static final String OSS_ACCESS_KEY = System.getenv("OSS_ACCESS_KEY_ID");public static final String OSS_SECRET_KEY = System.getenv("OSS_SECRET_ACCESS_KEY");diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopS3CatalogIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetS3CatalogIT.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopS3CatalogIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetS3CatalogIT.javaindex e79901ae05..2401851974 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopS3CatalogIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/FilesetS3CatalogIT.java@@ -16,9 +16,9 @@* specific language governing permissions and limitations* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.annotations.VisibleForTesting;import com.google.common.collect.ImmutableMap;@@ -49,8 +49,8 @@ import org.testcontainers.containers.Container;import org.testcontainers.shaded.org.awaitility.Awaitility;@Tag("gravitino-docker-test")-public class HadoopS3CatalogIT extends HadoopCatalogIT {- private static final Logger LOG = LoggerFactory.getLogger(HadoopOSSCatalogIT.class);+public class FilesetS3CatalogIT extends FilesetCatalogIT {+ private static final Logger LOG = LoggerFactory.getLogger(FilesetS3CatalogIT.class);private String bucketName = "s3-bucket-" + UUID.randomUUID().toString().replace("-", "");private String accessKey;private String secretKey;diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HDFSKerberosIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HDFSKerberosIT.javasimilarity index 98%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HDFSKerberosIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HDFSKerberosIT.javaindex acf1ab6461..f4b2ddd3c4 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HDFSKerberosIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HDFSKerberosIT.java@@ -17,7 +17,7 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;import java.io.File;import java.io.IOException;diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopUserAuthenticationIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.javasimilarity index 98%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopUserAuthenticationIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.javaindex 58507ea920..18951584e7 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopUserAuthenticationIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java@@ -17,12 +17,12 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;-import static org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig.AUTH_TYPE_KEY;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.IMPERSONATION_ENABLE_KEY;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.KEY_TAB_URI_KEY;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.PRINCIPAL_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig.AUTH_TYPE_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.IMPERSONATION_ENABLE_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.KEY_TAB_URI_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.PRINCIPAL_KEY;import com.google.common.base.Throwables;import com.google.common.collect.ImmutableMap;diff --git a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopUserImpersonationIT.java b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserImpersonationIT.javasimilarity index 96%rename from catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopUserImpersonationIT.javarename to catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserImpersonationIT.javaindex 5da898682a..f00f130fe4 100644--- a/catalogs/catalog-hadoop/src/test/java/org/apache/gravitino/catalog/hadoop/integration/test/HadoopUserImpersonationIT.java+++ b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserImpersonationIT.java@@ -17,12 +17,12 @@* under the License.*/-package org.apache.gravitino.catalog.hadoop.integration.test;+package org.apache.gravitino.catalog.fileset.integration.test;-import static org.apache.gravitino.catalog.hadoop.authentication.AuthenticationConfig.AUTH_TYPE_KEY;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.IMPERSONATION_ENABLE_KEY;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.KEY_TAB_URI_KEY;-import static org.apache.gravitino.catalog.hadoop.authentication.kerberos.KerberosConfig.PRINCIPAL_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.AuthenticationConfig.AUTH_TYPE_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.IMPERSONATION_ENABLE_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.KEY_TAB_URI_KEY;+import static org.apache.gravitino.catalog.fileset.authentication.kerberos.KerberosConfig.PRINCIPAL_KEY;import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.DFS_DATA_TRANSFER_PROTECTION_KEY;import com.google.common.collect.ImmutableMap;@@ -68,7 +68,7 @@ import org.testcontainers.shaded.org.apache.commons.lang3.SystemUtils;@Tag("gravitino-docker-test")public class HadoopUserImpersonationIT extends BaseIT {- private static final Logger LOG = LoggerFactory.getLogger(HadoopCatalogIT.class);+ private static final Logger LOG = LoggerFactory.getLogger(HadoopUserImpersonationIT.class);public static final String metalakeName =GravitinoITUtils.genRandomName("CatalogHadoopIT_metalake");diff --git a/catalogs/catalog-hadoop/src/test/resources/log4j2.properties b/catalogs/catalog-fileset/src/test/resources/log4j2.propertiessimilarity index 100%rename from catalogs/catalog-hadoop/src/test/resources/log4j2.propertiesrename to catalogs/catalog-fileset/src/test/resources/log4j2.propertiesdiff --git a/clients/client-java/build.gradle.kts b/clients/client-java/build.gradle.ktsindex 9d1681645b..30b3a15deb 100644--- a/clients/client-java/build.gradle.kts+++ b/clients/client-java/build.gradle.kts@@ -71,7 +71,7 @@ tasks.test {if (skipITs) {exclude("**/integration/test/**")} else {- dependsOn(":catalogs:catalog-hadoop:jar", ":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:jar", ":catalogs:catalog-fileset:runtimeJars")dependsOn(":catalogs:catalog-hive:jar", ":catalogs:catalog-hive:runtimeJars")dependsOn(":catalogs:catalog-kafka:jar", ":catalogs:catalog-kafka:runtimeJars")}diff --git a/clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/CatalogIT.java b/clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/CatalogIT.javaindex 8f6a7dd343..9f7928633e 100644--- a/clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/CatalogIT.java+++ b/clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/CatalogIT.java@@ -281,7 +281,7 @@ public class CatalogIT extends BaseIT {Assertions.assertEquals(catalogName, catalog.name());Assertions.assertEquals(Catalog.Type.FILESET, catalog.type());- Assertions.assertEquals("hadoop", catalog.provider());+ Assertions.assertEquals("fileset", catalog.provider());Assertions.assertEquals("catalog comment", catalog.comment());Assertions.assertEquals("true", catalog.properties().get(PROPERTY_IN_USE));metalake.disableCatalog(catalogName);diff --git a/clients/client-python/gravitino/api/catalog.py b/clients/client-python/gravitino/api/catalog.pyindex 8a28dedb3f..2014f8a398 100644--- a/clients/client-python/gravitino/api/catalog.py+++ b/clients/client-python/gravitino/api/catalog.py@@ -34,7 +34,7 @@ class Catalog(Auditable):RELATIONAL = ("relational", False)""""Catalog Type for Relational Data Structure, like db.table, catalog.db.table."""- FILESET = ("fileset", False)+ FILESET = ("fileset", True)"""Catalog Type for Fileset System (including HDFS, S3, etc.), like path/to/file"""MESSAGING = ("messaging", False)diff --git a/clients/client-python/gravitino/client/gravitino_metalake.py b/clients/client-python/gravitino/client/gravitino_metalake.pyindex be502aae70..a4a62559e1 100644--- a/clients/client-python/gravitino/client/gravitino_metalake.py+++ b/clients/client-python/gravitino/client/gravitino_metalake.py@@ -129,8 +129,8 @@ class GravitinoMetalake(MetalakeDTO):name: The name of the catalog.catalog_type: The type of the catalog.provider: The provider of the catalog. This parameter can be None if the catalog- provides a managed implementation. Currently, only the model catalog supports None- provider. For the details, please refer to the Catalog.Type.+ provides a managed implementation. Currently, the model and fileset catalog support+ None provider. For the details, please refer to the Catalog.Type.comment: The comment of the catalog.properties: The properties of the catalog.diff --git a/clients/client-python/tests/integration/test_fileset_catalog.py b/clients/client-python/tests/integration/test_fileset_catalog.pyindex 12d9d190e2..d657d4b154 100644--- a/clients/client-python/tests/integration/test_fileset_catalog.py+++ b/clients/client-python/tests/integration/test_fileset_catalog.py@@ -153,7 +153,7 @@ class TestFilesetCatalog(IntegrationTestEnv):catalog = self.gravitino_client.create_catalog(name=self.catalog_name,catalog_type=Catalog.Type.FILESET,- provider=self.catalog_provider,+ provider=None,comment="",properties={self.catalog_location_prop: "/tmp/test1"},)diff --git a/clients/client-python/tests/integration/test_gvfs_with_abs.py b/clients/client-python/tests/integration/test_gvfs_with_abs.pyindex 53c265c539..48a1a18e30 100644--- a/clients/client-python/tests/integration/test_gvfs_with_abs.py+++ b/clients/client-python/tests/integration/test_gvfs_with_abs.py@@ -48,7 +48,7 @@ def azure_abs_is_prepared():@unittest.skipUnless(azure_abs_is_prepared(), "Azure Blob Storage is not prepared.")class TestGvfsWithABS(TestGvfsWithHDFS):# Before running this test, please set the make sure azure-bundle-xxx.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directoryazure_abs_account_key = os.environ.get("ABS_ACCOUNT_KEY")azure_abs_account_name = os.environ.get("ABS_ACCOUNT_NAME")azure_abs_container_name = os.environ.get("ABS_CONTAINER_NAME")@@ -68,7 +68,9 @@ class TestGvfsWithABS(TestGvfsWithHDFS):def setUpClass(cls):cls._get_gravitino_home()- cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"+ cls.hadoop_conf_path = (+ f"{cls.gravitino_home}/catalogs/fileset/conf/fileset.conf"+ )# restart the servercls.restart_server()# create entitydiff --git a/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py b/clients/client-python/tests/integration/test_gvfs_with_abs_credential.pyindex a2fc0d2868..7aeb0f3ff7 100644--- a/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py+++ b/clients/client-python/tests/integration/test_gvfs_with_abs_credential.py@@ -53,7 +53,7 @@ def azure_abs_with_credential_is_prepared():)class TestGvfsWithCredentialABS(TestGvfsWithABS):# Before running this test, please set the make sure azure-bundle-xxx.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directoryazure_abs_account_key = os.environ.get("ABS_ACCOUNT_KEY_FOR_CREDENTIAL")azure_abs_account_name = os.environ.get("ABS_ACCOUNT_NAME_FOR_CREDENTIAL")azure_abs_container_name = os.environ.get("ABS_CONTAINER_NAME_FOR_CREDENTIAL")diff --git a/clients/client-python/tests/integration/test_gvfs_with_gcs.py b/clients/client-python/tests/integration/test_gvfs_with_gcs.pyindex 40e83d0081..1c87709f0b 100644--- a/clients/client-python/tests/integration/test_gvfs_with_gcs.py+++ b/clients/client-python/tests/integration/test_gvfs_with_gcs.py@@ -48,7 +48,7 @@ def gcs_is_configured():@unittest.skipUnless(gcs_is_configured(), "GCS is not configured.")class TestGvfsWithGCS(TestGvfsWithHDFS):# Before running this test, please set the make sure gcp-bundle-x.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directorykey_file = os.environ.get("GCS_SERVICE_ACCOUNT_JSON_PATH")bucket_name = os.environ.get("GCS_BUCKET_NAME")metalake_name: str = "TestGvfsWithGCS_metalake" + str(randint(1, 10000))@@ -65,7 +65,9 @@ class TestGvfsWithGCS(TestGvfsWithHDFS):def setUpClass(cls):cls._get_gravitino_home()- cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"+ cls.hadoop_conf_path = (+ f"{cls.gravitino_home}/catalogs/fileset/conf/fileset.conf"+ )# restart the servercls.restart_server()# create entitydiff --git a/clients/client-python/tests/integration/test_gvfs_with_gcs_credential.py b/clients/client-python/tests/integration/test_gvfs_with_gcs_credential.pyindex 00c0237ead..f4dea40d6f 100644--- a/clients/client-python/tests/integration/test_gvfs_with_gcs_credential.py+++ b/clients/client-python/tests/integration/test_gvfs_with_gcs_credential.py@@ -42,7 +42,7 @@ def gcs_with_credential_is_configured():@unittest.skipUnless(gcs_with_credential_is_configured(), "GCS is not configured.")class TestGvfsWithGCSCredential(TestGvfsWithGCS):# Before running this test, please set the make sure gcp-bundle-x.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directorykey_file = os.environ.get("GCS_SERVICE_ACCOUNT_JSON_PATH_FOR_CREDENTIAL")bucket_name = os.environ.get("GCS_BUCKET_NAME_FOR_CREDENTIAL")metalake_name: str = "TestGvfsWithGCSCredential_metalake" + str(randint(1, 10000))diff --git a/clients/client-python/tests/integration/test_gvfs_with_hdfs.py b/clients/client-python/tests/integration/test_gvfs_with_hdfs.pyindex e772499f4a..5a63ff8cd1 100644--- a/clients/client-python/tests/integration/test_gvfs_with_hdfs.py+++ b/clients/client-python/tests/integration/test_gvfs_with_hdfs.py@@ -110,7 +110,9 @@ class TestGvfsWithHDFS(IntegrationTestEnv):"gravitino.bypass.fs.defaultFS": f"hdfs://{hdfs_container_ip}:9000"}- cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"+ cls.hadoop_conf_path = (+ f"{cls.gravitino_home}/catalogs/fileset/conf/fileset.conf"+ )# append the hadoop conf to servercls._append_conf(cls.config, cls.hadoop_conf_path)diff --git a/clients/client-python/tests/integration/test_gvfs_with_oss.py b/clients/client-python/tests/integration/test_gvfs_with_oss.pyindex 97219a8414..2fa9a3f062 100644--- a/clients/client-python/tests/integration/test_gvfs_with_oss.py+++ b/clients/client-python/tests/integration/test_gvfs_with_oss.py@@ -51,7 +51,7 @@ def oss_is_configured():@unittest.skipUnless(oss_is_configured(), "OSS is not configured.")class TestGvfsWithOSS(TestGvfsWithHDFS):# Before running this test, please set the make sure aliyun-bundle-x.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directoryoss_access_key = os.environ.get("OSS_ACCESS_KEY_ID")oss_secret_key = os.environ.get("OSS_SECRET_ACCESS_KEY")oss_endpoint = os.environ.get("OSS_ENDPOINT")@@ -73,7 +73,9 @@ class TestGvfsWithOSS(TestGvfsWithHDFS):def setUpClass(cls):cls._get_gravitino_home()- cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"+ cls.hadoop_conf_path = (+ f"{cls.gravitino_home}/catalogs/fileset/conf/fileset.conf"+ )# restart the servercls.restart_server()# create entitydiff --git a/clients/client-python/tests/integration/test_gvfs_with_oss_credential.py b/clients/client-python/tests/integration/test_gvfs_with_oss_credential.pyindex 18a3eec152..0b7c90b430 100644--- a/clients/client-python/tests/integration/test_gvfs_with_oss_credential.py+++ b/clients/client-python/tests/integration/test_gvfs_with_oss_credential.py@@ -53,7 +53,7 @@ def oss_with_credential_is_configured():)class TestGvfsWithOSSCredential(TestGvfsWithOSS):# Before running this test, please set the make sure aliyun-bundle-x.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directoryoss_access_key = os.environ.get("OSS_STS_ACCESS_KEY_ID")oss_secret_key = os.environ.get("OSS_STS_SECRET_ACCESS_KEY")oss_endpoint = os.environ.get("OSS_STS_ENDPOINT")diff --git a/clients/client-python/tests/integration/test_gvfs_with_s3.py b/clients/client-python/tests/integration/test_gvfs_with_s3.pyindex fadcf352d4..e23b4ccc48 100644--- a/clients/client-python/tests/integration/test_gvfs_with_s3.py+++ b/clients/client-python/tests/integration/test_gvfs_with_s3.py@@ -49,7 +49,7 @@ def s3_is_configured():@unittest.skipUnless(s3_is_configured(), "S3 is not configured.")class TestGvfsWithS3(TestGvfsWithHDFS):# Before running this test, please set the make sure aws-bundle-x.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directorys3_access_key = os.environ.get("S3_ACCESS_KEY_ID")s3_secret_key = os.environ.get("S3_SECRET_ACCESS_KEY")s3_endpoint = os.environ.get("S3_ENDPOINT")@@ -71,7 +71,9 @@ class TestGvfsWithS3(TestGvfsWithHDFS):def setUpClass(cls):cls._get_gravitino_home()- cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"+ cls.hadoop_conf_path = (+ f"{cls.gravitino_home}/catalogs/fileset/conf/fileset.conf"+ )# restart the servercls.restart_server()# create entitydiff --git a/clients/client-python/tests/integration/test_gvfs_with_s3_credential.py b/clients/client-python/tests/integration/test_gvfs_with_s3_credential.pyindex 5ee41fb5c0..b90c782a10 100644--- a/clients/client-python/tests/integration/test_gvfs_with_s3_credential.py+++ b/clients/client-python/tests/integration/test_gvfs_with_s3_credential.py@@ -50,7 +50,7 @@ def s3_with_credential_is_configured():@unittest.skipUnless(s3_with_credential_is_configured(), "S3 is not configured.")class TestGvfsWithS3Credential(TestGvfsWithS3):# Before running this test, please set the make sure aws-bundle-x.jar has been- # copy to the $GRAVITINO_HOME/catalogs/hadoop/libs/ directory+ # copy to the $GRAVITINO_HOME/catalogs/fileset/libs/ directorys3_access_key = os.environ.get("S3_STS_ACCESS_KEY_ID")s3_secret_key = os.environ.get("S3_STS_SECRET_ACCESS_KEY")s3_endpoint = os.environ.get("S3_STS_ENDPOINT")diff --git a/clients/filesystem-fuse/tests/bin/gravitino_server.sh b/clients/filesystem-fuse/tests/bin/gravitino_server.shindex baec9a294c..b1dc20af7d 100644--- a/clients/filesystem-fuse/tests/bin/gravitino_server.sh+++ b/clients/filesystem-fuse/tests/bin/gravitino_server.sh@@ -55,17 +55,15 @@ create_resource() {fi}--start_gravitino_server() {echo "Starting Gravitino Server"# copy the aws-bundle to the server- if ls $GRAVITINO_SERVER_DIR/catalogs/hadoop/libs/gravitino-aws-bundle-*.jar 1>/dev/null 2>&1; then+ if ls $GRAVITINO_SERVER_DIR/catalogs/fileset/libs/gravitino-aws-bundle-*.jar 1>/dev/null 2>&1; thenecho "File exists, skipping copy."elseecho "Copying the aws-bundle to the server"cp $GRAVITINO_HOME/bundles/aws-bundle/build/libs/gravitino-aws-bundle-*.jar \- $GRAVITINO_SERVER_DIR/catalogs/hadoop/libs+ $GRAVITINO_SERVER_DIR/catalogs/fileset/libsfirm -rf $GRAVITINO_SERVER_DIR/datadiff --git a/clients/filesystem-hadoop3/build.gradle.kts b/clients/filesystem-hadoop3/build.gradle.ktsindex 5570f14db2..ace9fa42d9 100644--- a/clients/filesystem-hadoop3/build.gradle.kts+++ b/clients/filesystem-hadoop3/build.gradle.kts@@ -42,7 +42,7 @@ dependencies {testImplementation(project(":api"))testImplementation(project(":core"))- testImplementation(project(":catalogs:catalog-hadoop"))+ testImplementation(project(":catalogs:catalog-fileset"))testImplementation(project(":common"))testImplementation(project(":server"))testImplementation(project(":server-common"))@@ -90,8 +90,8 @@ tasks.build {}tasks.compileJava {- dependsOn(":catalogs:catalog-hadoop:jar")- dependsOn(":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:jar")+ dependsOn(":catalogs:catalog-fileset:runtimeJars")}tasks.test {@@ -99,7 +99,7 @@ tasks.test {if (skipITs) {exclude("**/integration/test/**")} else {- dependsOn(":catalogs:catalog-hadoop:jar", ":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:jar", ":catalogs:catalog-fileset:runtimeJars")}// this task depends on :bundles:aws-bundle:shadowJardiff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/FilesetCatalogCredentialIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/FilesetCatalogCredentialIT.javaindex 5fc8cb9bd4..497ee88d37 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/FilesetCatalogCredentialIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/FilesetCatalogCredentialIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.ImmutableMap;import com.google.common.collect.Maps;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSCredentialIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSCredentialIT.javaindex 2f79332e8b..9f30257253 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSCredentialIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSCredentialIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.ImmutableMap;import com.google.common.collect.Maps;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSIT.javaindex f6029e0913..62c1d29195 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemABSIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.ImmutableMap;import com.google.common.collect.Maps;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSCredentialIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSCredentialIT.javaindex 81b352fa55..0e8cced875 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSCredentialIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSCredentialIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.Maps;import java.io.IOException;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSIT.javaindex 05cd88f3bb..5818af148c 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemGCSIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.Maps;import java.io.IOException;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSCredentialIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSCredentialIT.javaindex 662e8f6e46..00d6fa8cb2 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSCredentialIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSCredentialIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.Maps;import java.io.IOException;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSIT.javaindex e495cde850..eb76bfd641 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemOSSIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.Maps;import java.io.IOException;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3CredentialIT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3CredentialIT.javaindex 12d5309675..32d61323f6 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3CredentialIT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3CredentialIT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.Maps;import java.io.IOException;diff --git a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3IT.java b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3IT.javaindex 4c5091dbc7..05fc78475c 100644--- a/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3IT.java+++ b/clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/integration/test/GravitinoVirtualFileSystemS3IT.java@@ -19,7 +19,7 @@package org.apache.gravitino.filesystem.hadoop.integration.test;-import static org.apache.gravitino.catalog.hadoop.HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;+import static org.apache.gravitino.catalog.fileset.FilesetCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS;import com.google.common.collect.Maps;import java.io.IOException;diff --git a/common/src/main/java/org/apache/gravitino/dto/requests/CatalogCreateRequest.java b/common/src/main/java/org/apache/gravitino/dto/requests/CatalogCreateRequest.javaindex d543ddb164..dc30a7a561 100644--- a/common/src/main/java/org/apache/gravitino/dto/requests/CatalogCreateRequest.java+++ b/common/src/main/java/org/apache/gravitino/dto/requests/CatalogCreateRequest.java@@ -85,6 +85,13 @@ public class CatalogCreateRequest implements RESTRequest {+ type+ " that doesn't support managed catalog");}++ if (this.provider.equalsIgnoreCase("hadoop")) {+ // For backward compatibility, if the provider is "hadoop" (legacy case), we set the+ // provider to "fileset". This is because provider "hadoop" was previously used as a+ // "fileset" catalog. This is a special case to maintain compatibility.+ this.provider = CatalogProvider.shortNameForManagedCatalog(type);+ }}/**diff --git a/core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java b/core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.javaindex 03f1ab5845..9037d660ed 100644--- a/core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java+++ b/core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java@@ -489,7 +489,7 @@ public class AuthorizationUtils {break;case FILESET:- if ("hadoop".equals(catalogObj.provider())) {+ if ("fileset".equals(catalogObj.provider())) {if (schema.properties().containsKey(FILESET_SCHEMA_LOCATION)) {String schemaLocation = schema.properties().get(FILESET_SCHEMA_LOCATION);if (StringUtils.isNotBlank(schemaLocation)) {diff --git a/core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java b/core/src/main/java/org/apache/gravitino/catalog/CatalogManager.javaindex 0ff93859d3..336efc1477 100644--- a/core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java+++ b/core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java@@ -365,6 +365,10 @@ public class CatalogManager implements CatalogDispatcher, Closeable {return store.list(namespace, CatalogEntity.class, EntityType.CATALOG);});return catalogEntities.stream()+ // The old fileset catalog's provider is "hadoop", whereas the new fileset catalog's+ // provider is "fileset", still using "hadoop" will lead to catalog loading issue. So+ // after reading the catalog entity, we convert it to the new fileset catalog entity.+ .map(this::convertFilesetCatalogEntity).map(e -> e.toCatalogInfoWithResolvedProps(getResolvedProperties(e))).toArray(Catalog[]::new);} catch (IOException ioe) {@@ -699,10 +703,14 @@ public class CatalogManager implements CatalogDispatcher, Closeable {return newCatalogBuilder.build();});+ // The old fileset catalog's provider is "hadoop", whereas the new fileset catalog's+ // provider is "fileset", still using "hadoop" will lead to catalog loading issue. So+ // after reading the catalog entity, we convert it to the new fileset catalog entity.+ CatalogEntity convertedCatalog = convertFilesetCatalogEntity(updatedCatalog);return Objects.requireNonNull(catalogCache.get(- updatedCatalog.nameIdentifier(),- id -> createCatalogWrapper(updatedCatalog, null)))+ convertedCatalog.nameIdentifier(),+ id -> createCatalogWrapper(convertedCatalog, null))).catalog;} catch (NoSuchEntityException ne) {@@ -934,7 +942,11 @@ public class CatalogManager implements CatalogDispatcher, Closeable {private CatalogWrapper loadCatalogInternal(NameIdentifier ident) throws NoSuchCatalogException {try {CatalogEntity entity = store.get(ident, EntityType.CATALOG, CatalogEntity.class);- return createCatalogWrapper(entity, null);+ // The old fileset catalog's provider is "hadoop", whereas the new fileset catalog's+ // provider is "fileset", still using "hadoop" will lead to catalog loading issue. So+ // after reading the catalog entity, we convert it to the new fileset catalog entity.+ CatalogEntity convertedEntity = convertFilesetCatalogEntity(entity);+ return createCatalogWrapper(convertedEntity, null);} catch (NoSuchEntityException ne) {LOG.warn("Catalog {} does not exist", ident, ne);@@ -1198,4 +1210,34 @@ public class CatalogManager implements CatalogDispatcher, Closeable {return builder.withProperties(newProps);}++ private CatalogEntity convertFilesetCatalogEntity(CatalogEntity entity) {+ if (entity.getType() != FILESET) {+ return entity;+ }++ if ("hadoop".equalsIgnoreCase(entity.getProvider())) {+ // If the provider is "hadoop", we need to convert it to a fileset catalog entity.+ // This is a special case to maintain compatibility.+ return CatalogEntity.builder()+ .withId(entity.id())+ .withName(entity.name())+ .withNamespace(entity.namespace())+ .withType(FILESET)+ .withProvider("fileset")+ .withComment(entity.getComment())+ .withProperties(entity.getProperties())+ .withAuditInfo(+ AuditInfo.builder()+ .withCreator(entity.auditInfo().creator())+ .withCreateTime(entity.auditInfo().createTime())+ .withLastModifier(entity.auditInfo().lastModifier())+ .withLastModifiedTime(entity.auditInfo().lastModifiedTime())+ .build())+ .build();+ }++ // If the provider is not "hadoop", we assume it is already a fileset catalog entity.+ return entity;+ }}diff --git a/core/src/main/java/org/apache/gravitino/utils/IsolatedClassLoader.java b/core/src/main/java/org/apache/gravitino/utils/IsolatedClassLoader.javaindex 28982b1cbe..5feaf8b5ba 100644--- a/core/src/main/java/org/apache/gravitino/utils/IsolatedClassLoader.java+++ b/core/src/main/java/org/apache/gravitino/utils/IsolatedClassLoader.java@@ -247,6 +247,8 @@ public class IsolatedClassLoader implements Closeable {|| name.startsWith("org.apache.gravitino.catalog.postgresql.")|| name.startsWith("org.apache.gravitino.catalog.doris.")|| name.startsWith("org.apache.gravitino.catalog.hadoop.")+ || name.startsWith("org.apache.gravitino.catalog.fileset.")+ || name.startsWith("org.apache.gravitino.catalog.model.")|| name.startsWith("org.apache.gravitino.catalog.kafka."));}diff --git a/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java b/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.javaindex 04d9bdff32..7de324c9b0 100644--- a/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java+++ b/integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/BaseIT.java@@ -423,7 +423,7 @@ public class BaseIT {}String gravitinoHome = System.getenv("GRAVITINO_HOME");- String hadoopLibDirs = ITUtils.joinPath(gravitinoHome, "catalogs", "hadoop", "libs");+ String hadoopLibDirs = ITUtils.joinPath(gravitinoHome, "catalogs", "fileset", "libs");copyBundleJarsToDirectory(bundleName, hadoopLibDirs);}diff --git a/settings.gradle.kts b/settings.gradle.ktsindex d4262e69c3..0b6939f28e 100644--- a/settings.gradle.kts+++ b/settings.gradle.kts@@ -39,7 +39,7 @@ include("catalogs:catalog-jdbc-postgresql","catalogs:catalog-jdbc-oceanbase")-include("catalogs:catalog-hadoop")+include("catalogs:catalog-fileset")include("catalogs:catalog-kafka")include("catalogs:catalog-model")include(diff --git a/web/integration-test/build.gradle.kts b/web/integration-test/build.gradle.ktsindex 90ac2ad509..11d941ecca 100644--- a/web/integration-test/build.gradle.kts+++ b/web/integration-test/build.gradle.kts@@ -62,7 +62,7 @@ tasks.test {dependsOn(":catalogs:catalog-jdbc-doris:jar", ":catalogs:catalog-jdbc-doris:runtimeJars")dependsOn(":catalogs:catalog-jdbc-mysql:jar", ":catalogs:catalog-jdbc-mysql:runtimeJars")dependsOn(":catalogs:catalog-jdbc-postgresql:jar", ":catalogs:catalog-jdbc-postgresql:runtimeJars")- dependsOn(":catalogs:catalog-hadoop:jar", ":catalogs:catalog-hadoop:runtimeJars")+ dependsOn(":catalogs:catalog-fileset:jar", ":catalogs:catalog-fileset:runtimeJars")dependsOn(":catalogs:catalog-hive:jar", ":catalogs:catalog-hive:runtimeJars")dependsOn(":catalogs:catalog-kafka:jar", ":catalogs:catalog-kafka:runtimeJars")