From 77785e9d1080f01fce42432fd2f9f8cbbb17b5c9 Mon Sep 17 00:00:00 2001 From: yuqi Date: Thu, 31 Oct 2024 20:00:55 +0800 Subject: [PATCH] Optimized. --- .../catalog/hadoop/HadoopCatalogOperations.java | 2 +- .../hadoop/HadoopCatalogPropertiesMetadata.java | 12 ++++++------ docs/hadoop-catalog.md | 7 ++++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java b/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java index 91884deb3e..a0abf56eb2 100644 --- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java +++ b/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java @@ -782,7 +782,7 @@ FileSystem getFileSystem(Path path, Map config) throws IOExcepti (int) propertiesMetadata .catalogPropertiesMetadata() - .getOrDefault(config, HadoopCatalogPropertiesMetadata.REQUEST_TIMEOUT_SECONDS); + .getOrDefault(config, HadoopCatalogPropertiesMetadata.GET_FILESYSTEM_TIMEOUT_SECONDS); try { AtomicReference fileSystem = new AtomicReference<>(); Awaitility.await() diff --git a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.java b/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.java index 70122a461c..225dab38f9 100644 --- a/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.java +++ b/catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogPropertiesMetadata.java @@ -52,8 +52,8 @@ public class HadoopCatalogPropertiesMetadata extends BaseCatalogPropertiesMetada */ public static final String DEFAULT_FS_PROVIDER = "default-filesystem-provider"; - static final String REQUEST_TIMEOUT_SECONDS = "request-timeout-seconds"; - static final int DEFAULT_REQUEST_TIMEOUT_SECONDS = 10; + static final String GET_FILESYSTEM_TIMEOUT_SECONDS = "get-filesystem-timeout-seconds"; + static final int DEFAULT_GET_FILESYSTEM_TIMEOUT_SECONDS = 10; public static final String BUILTIN_LOCAL_FS_PROVIDER = "builtin-local"; public static final String BUILTIN_HDFS_FS_PROVIDER = "builtin-hdfs"; @@ -85,12 +85,12 @@ public class HadoopCatalogPropertiesMetadata extends BaseCatalogPropertiesMetada BUILTIN_LOCAL_FS_PROVIDER, // please see LocalFileSystemProvider#name() false /* hidden */)) .put( - REQUEST_TIMEOUT_SECONDS, + GET_FILESYSTEM_TIMEOUT_SECONDS, PropertyEntry.integerOptionalPropertyEntry( - REQUEST_TIMEOUT_SECONDS, - "Timeout to wait for to create the Hadoop file system", + GET_FILESYSTEM_TIMEOUT_SECONDS, + "Timeout to wait for to create the Hadoop file system client instance.", false /* immutable */, - DEFAULT_REQUEST_TIMEOUT_SECONDS, + DEFAULT_GET_FILESYSTEM_TIMEOUT_SECONDS, false /* hidden */)) // The following two are about authentication. .putAll(KERBEROS_PROPERTY_ENTRIES) diff --git a/docs/hadoop-catalog.md b/docs/hadoop-catalog.md index 46b22f4dec..47ddf85287 100644 --- a/docs/hadoop-catalog.md +++ b/docs/hadoop-catalog.md @@ -25,9 +25,10 @@ Hadoop 3. If there's any compatibility issue, please create an [issue](https://g Besides the [common catalog properties](./gravitino-server-config.md#gravitino-catalog-properties-configuration), the Hadoop catalog has the following properties: -| Property Name | Description | Default Value | Required | Since Version | -|---------------|-------------------------------------------------|---------------|----------|---------------| -| `location` | The storage location managed by Hadoop catalog. | (none) | No | 0.5.0 | +| Property Name | Description | Default Value | Required | Since Version | +|----------------------------------|----------------------------------------------------------------------------|---------------|----------|------------------| +| `location` | The storage location managed by Hadoop catalog. | (none) | No | 0.5.0 | +| `get-filesystem-timeout-seconds` | The timeout of getting the file system client instance. Time unit: seconds.| 10 | No | 0.7.0-incubating | Apart from the above properties, to access fileset like HDFS, S3, GCS, OSS or custom fileset, you need to configure the following extra properties.