World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#979] improve(doc): Align the configuration code with #926 doc changes (#989)
Jerry Shao0703cbc421b3
diff --git a/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveSchemaPropertiesMetadata.java b/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveSchemaPropertiesMetadata.javaindex 8a924ffc7f..da2154019e 100644--- a/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveSchemaPropertiesMetadata.java+++ b/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveSchemaPropertiesMetadata.java@@ -21,7 +21,12 @@ public class HiveSchemaPropertiesMetadata extends BasePropertiesMetadata {List<PropertyEntry<?>> propertyEntries =ImmutableList.of(stringOptionalPropertyEntry(- LOCATION, "The location for Hive database storage", false, null, false));+ LOCATION,+ "The directory for Hive database storage. Not required, HMS uses the value of "+ + "`hive.metastore.warehouse.dir` in the hive-site.xml by default",+ false,+ null,+ false));propertiesMetadata = Maps.uniqueIndex(propertyEntries, PropertyEntry::getName);}diff --git a/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveTablePropertiesMetadata.java b/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveTablePropertiesMetadata.javaindex dfe3f44917..2abb8c8fca 100644--- a/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveTablePropertiesMetadata.java+++ b/catalogs/catalog-hive/src/main/java/com/datastrato/gravitino/catalog/hive/HiveTablePropertiesMetadata.java@@ -131,10 +131,15 @@ public class HiveTablePropertiesMetadata extends BasePropertiesMetadata {booleanReservedPropertyEntry(EXTERNAL, "Indicate whether it is an external table", false, true),stringImmutablePropertyEntry(- LOCATION, "HDFS location for table storage", false, null, false, false),+ LOCATION,+ "The location for table storage. Not required, HMS will use the database location as the parent directory by default",+ false,+ null,+ false,+ false),enumImmutablePropertyEntry(TABLE_TYPE,- "The type of Hive table",+ "Type of the table",false,TableType.class,MANAGED_TABLE,@@ -142,7 +147,7 @@ public class HiveTablePropertiesMetadata extends BasePropertiesMetadata {false),enumImmutablePropertyEntry(FORMAT,- "The table storage format",+ "The table file format",false,StorageFormat.class,TEXTFILE,diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.javaindex 81ae87a1fb..942715edfc 100644--- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java+++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java@@ -20,14 +20,14 @@ public class IcebergConfig extends Config {public static final ConfigEntry<String> CATALOG_BACKEND =new ConfigBuilder(CATALOG_BACKEND_NAME)- .doc("Choose the implementation of the Iceberg catalog")+ .doc("Catalog backend of Gravitino Iceberg catalog").version("0.2.0").stringConf().createWithDefault("memory");public static final ConfigEntry<String> CATALOG_WAREHOUSE =new ConfigBuilder(WAREHOUSE)- .doc("The warehouse config of the Iceberg catalog")+ .doc("Warehouse directory of catalog").version("0.2.0").stringConf().createWithDefault(null);diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergTablePropertiesMetadata.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergTablePropertiesMetadata.javaindex 998434ca9f..af729df107 100644--- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergTablePropertiesMetadata.java+++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergTablePropertiesMetadata.java@@ -27,19 +27,19 @@ public class IcebergTablePropertiesMetadata extends BasePropertiesMetadata {static {List<PropertyEntry<?>> propertyEntries =ImmutableList.of(- stringReservedPropertyEntry(COMMENT, "Table comment", true),- stringReservedPropertyEntry(CREATOR, "Table creator info", false),+ stringReservedPropertyEntry(COMMENT, "The table comment", true),+ stringReservedPropertyEntry(CREATOR, "The table creator", false),stringReservedPropertyEntry(LOCATION, "Iceberg location for table storage", false),stringReservedPropertyEntry(CURRENT_SNAPSHOT_ID,- "The snapshot representing the current state of the table",+ "The snapshot represents the current state of the table",false),stringReservedPropertyEntry(CHERRY_PICK_SNAPSHOT_ID,- "Selecting a specific snapshots in a merge operation",+ "Selecting a specific snapshot in a merge operation",false),stringReservedPropertyEntry(- SORT_ORDER, "Selecting a specific snapshots in a merge operation", false),+ SORT_ORDER, "Selecting a specific snapshot in a merge operation", false),stringReservedPropertyEntry(IDENTIFIER_FIELDS, "The identifier field(s) for defining the table", false));PROPERTIES_METADATA = Maps.uniqueIndex(propertyEntries, PropertyEntry::getName);diff --git a/core/src/main/java/com/datastrato/gravitino/Configs.java b/core/src/main/java/com/datastrato/gravitino/Configs.javaindex 114c303ddb..e3d01e8da9 100644--- a/core/src/main/java/com/datastrato/gravitino/Configs.java+++ b/core/src/main/java/com/datastrato/gravitino/Configs.java@@ -27,21 +27,21 @@ public interface Configs {ConfigEntry<String> ENTITY_STORE =new ConfigBuilder(ENTITY_STORE_KEY)- .doc("The entity store to use")+ .doc("Which storage implementation to use").version("0.1.0").stringConf().createWithDefault(DEFAULT_ENTITY_STORE);ConfigEntry<String> ENTITY_KV_STORE =new ConfigBuilder(ENTITY_KV_STORE_KEY)- .doc("The kv entity store to use")+ .doc("Detailed implementation of Kv storage").version("0.1.0").stringConf().createWithDefault(DEFAULT_ENTITY_KV_STORE);ConfigEntry<String> ENTRY_KV_ROCKSDB_BACKEND_PATH =new ConfigBuilder(ENTITY_KV_ROCKSDB_BACKEND_PATH_KEY)- .doc("The RocksDB backend path for entity store")+ .doc("Directory path of `RocksDBKvBackend`").version("0.1.0").stringConf().createWithDefault(DEFAULT_KV_ROCKSDB_BACKEND_PATH);@@ -76,7 +76,7 @@ public interface Configs {ConfigEntry<Long> STORE_TRANSACTION_MAX_SKEW_TIME =new ConfigBuilder("gravitino.entity.store.maxTransactionSkewTimeMs")- .doc("Max time skew allowed for transaction, Unit: millisecond")+ .doc("The maximum skew time of transactions in milliseconds").version("0.3.0").longConf().createWithDefault(2000L);@@ -84,7 +84,7 @@ public interface Configs {ConfigEntry<Long> KV_DELETE_AFTER_TIME =new ConfigBuilder(KV_DELETE_AFTER_TIME_KEY).doc(- "The max time that the deleted data and old version data will keep, unit: millisecond. At least 10 minutes and should not larger than 30 days ")+ "The maximum time in milliseconds that the deleted data and old version data is kept").version("0.3.0").longConf().createWithDefault(DEFAULT_KV_DELETE_AFTER_TIME);diff --git a/docs/gravitino-manage-hive.md b/docs/gravitino-manage-hive.mdindex c4e3cc67b0..62ab5bc4da 100644--- a/docs/gravitino-manage-hive.md+++ b/docs/gravitino-manage-hive.md@@ -78,9 +78,9 @@ Example JSON:### Schema properties-| Property name | Description | example value | Since version |-|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|---------------|-| `location` | Hive uses the value hive.metastore.warehouse.dir in the Hive configuration file hive-site.xml by default for the directory of Hive database storage. | `/user/hive/warehouse` | 0.1.0 |+| Property name | Description | example value | Since version |+|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|---------------|+| `location` | The directory for Hive database storage. Not required, HMS uses the value of `hive.metastore.warehouse.dir` in the hive-site.xml by default. | `/user/hive/warehouse` | 0.1.0 |## Creating an Apache Hive Tablediff --git a/docs/gravitino-server-config.md b/docs/gravitino-server-config.mdindex b05b16c1dc..19d3542dc7 100644--- a/docs/gravitino-server-config.md+++ b/docs/gravitino-server-config.md@@ -28,20 +28,21 @@ The `gravitino.conf` file lists the configuration items in the following table.| `gravitino.server.webserver.maxThreads` | The maximum number of threads in the thread pool used by Jetty webserver. `maxThreads` will be adjusted to 8 if the value is less than 8, and `maxThreads` must be great or equal to `minThreads` | `Math.max(Runtime.getRuntime().availableProcessors() * 4, 400)` | 0.1.0 || `gravitino.server.webserver.threadPoolWorkQueueSize` | The size of the queue in the thread pool used by Jetty webserver. | `100` | 0.1.0 || `gravitino.server.webserver.stopTimeout` | Time in milliseconds to gracefully shutdown the Jetty webserver, for more, please see `org.eclipse.jetty.server.Server#setStopTimeout`. | `30000` | 0.2.0 |-| `gravitino.server.webserver.idleTimeout` | The timeout in milliseconds of idle connections. ms. | `30000` | 0.2.0 |+| `gravitino.server.webserver.idleTimeout` | The timeout in milliseconds of idle connections. | `30000` | 0.2.0 || `gravitino.server.webserver.requestHeaderSize` | Maximum size of HTTP requests. | `131072` | 0.1.0 || `gravitino.server.webserver.responseHeaderSize` | Maximum size of HTTP responses. | `131072` | 0.1.0 || `gravitino.server.shutdown.timeout` | Time in milliseconds to gracefully shutdown of the Gravitino webserver. | `3000` | 0.2.0 |### Storage configuration-| Configuration item | Description | Default value | Since version |-|---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------|---------------|-| `gravitino.entity.store` | Which storage implementation to use, currently supported is key-value pair storage, the default value is `kv`. | `kv` | 0.1.0 |-| `gravitino.entity.store.kv` | Detailed implementation of Kv storage, currently supported is `RocksDB` storage implementation `RocksDBKvBackend`. | `RocksDBKvBackend` | 0.1.0 |+| Configuration item | Description | Default value | Since version |+|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------|---------------|+| `gravitino.entity.store` | Which storage implementation to use, currently supported is key-value pair storage, the default value is `kv`. | `kv` | 0.1.0 |+| `gravitino.entity.store.kv` | Detailed implementation of Kv storage, currently supported is `RocksDB` storage implementation `RocksDBKvBackend`. | `RocksDBKvBackend` | 0.1.0 || `gravitino.entity.store.kv.rocksdbPath` | Directory path of `RocksDBKvBackend`, **It's highly recommend that you change this default value** as it's under the deploy directory and future version upgrades may remove it. | `${GRAVITINO_HOME}/data/rocksdb` | 0.1.0 |-| `gravitino.entity.store.maxTransactionSkewTimeMs` | The maximum skew time of transactions in milliseconds. | `2000` | 0.3.0 |-| `gravitino.entity.store.kv.deleteAfterTimeMs` | The maximum time in milliseconds that the deleted data and old version data is kept. Set to at least 10 minutes and no longer than 30 days. | `604800000`(7 days) | 0.3.0 |+| `graivitino.entity.serde` | The serialization/deserialization class used to support entity storage, currently supported is `proto`. | `proto` | 0.1.0 |+| `gravitino.entity.store.maxTransactionSkewTimeMs` | The maximum skew time of transactions in milliseconds. | `2000` | 0.3.0 |+| `gravitino.entity.store.kv.deleteAfterTimeMs` | The maximum time in milliseconds that the deleted data and old version data is kept. Set to at least 10 minutes and no longer than 30 days. | `604800000`(7 days) | 0.3.0 |### Catalog configurationdiff --git a/docs/gravitino-use-iceberg.md b/docs/gravitino-use-iceberg.mdindex cf73a205be..bad98304fb 100644--- a/docs/gravitino-use-iceberg.md+++ b/docs/gravitino-use-iceberg.md@@ -53,11 +53,11 @@ http://{GravitinoServerHost}:8090/api/metalakes/{Your_metalake_name}/catalogs### Catalog configuration-| Configuration item | Description | value |-|--------------------|--------------------------------------------------|--------------------------------------------------------------------------------------------------------|-| `catalog-backend` | Catalog backend of Gravitino Iceberg | `hive` or `jdbc` |-| `uri` | Hive metadata address or JDBC connection address | `thrift://127.0.0.1:9083` or `jdbc:postgresql://127.0.0.1:5432/` or `jdbc:mysql://127.0.0.1:3306/test` |-| `warehouse` | Warehouse directory of Catalog | `/user/hive/warehouse-hive/` or `hdfs://namespace/hdfs/path` |+| Configuration item | Description | value |+|--------------------|-----------------------------------------------|--------------------------------------------------------------------------------------------------------|+| `catalog-backend` | Catalog backend of Gravitino Iceberg catalog. | `hive` or `jdbc` |+| `uri` | The uri config of the Iceberg catalog. | `thrift://127.0.0.1:9083` or `jdbc:postgresql://127.0.0.1:5432/` or `jdbc:mysql://127.0.0.1:3306/test` |+| `warehouse` | Warehouse directory of catalog. | `/user/hive/warehouse-hive/` or `hdfs://namespace/hdfs/path` |### HDFS configuration@@ -138,15 +138,15 @@ Iceberg lacks distribution support. For buckets, consider using partitions insteGravitino reserves the following fields, and you can't pass them in properties.-| Configuration item | Description |-|---------------------------|-----------------------------------------------------------|-| `comment` | The table comment. |-| `creator` | The table creator. |-| `location` | Iceberg location for table storage. |+| Configuration item | Description |+|---------------------------|---------------------------------------------------------|+| `comment` | The table comment. |+| `creator` | The table creator. |+| `location` | Iceberg location for table storage. || `current-snapshot-id` | The snapshot represents the current state of the table. |-| `cherry-pick-snapshot-id` | Selecting a specific snapshot in a merge operation. |-| `sort-order` | Selecting a specific snapshot in a merge operation. |-| `identifier-fields` | The identifier fields for defining the table. |+| `cherry-pick-snapshot-id` | Selecting a specific snapshot in a merge operation. |+| `sort-order` | Selecting a specific snapshot in a merge operation. |+| `identifier-fields` | The identifier field(s) for defining the table. |Regarding Iceberg's properties, you can refer to [official documentation](https://iceberg.apache.org/docs/1.3.1/configuration/).diff --git a/docs/security.md b/docs/security.mdindex 190bf7abb0..77c02889a9 100644--- a/docs/security.md+++ b/docs/security.md@@ -26,7 +26,9 @@ GravitinoClient client = GravitinoClient.builder(uri)Gravitino only supports external OAuth 2.0 servers.First, users need to guarantee that the external correctly configured OAuth 2.0 server supports Bearer JWT.-Then, on the server side, users should set `gravitino.authenticator` as `oauth` and give `gravitino.authenticator.oauth.defaultSignKey`, `gravitino.authenticator.oauth.serverURI` and `gravitino.authenticator.oauth.tokenPath` a proper value.+Then, on the server side, users should set `gravitino.authenticator` as `oauth` and give+`gravitino.authenticator.oauth.defaultSignKey`, `gravitino.authenticator.oauth.serverUri` and+`gravitino.authenticator.oauth.tokenPath` a proper value.Next, for the client side, users can enable `OAuth` mode by the following code:```java@@ -44,14 +46,15 @@ GravitinoClient client = GravitinoClient.builder(uri)### Server configuration-| Configuration item | Description | Default value | Since version |-|-------------------------------------------------|----------------------------------------------------------------------------|-------------------|---------------|-| `gravitino.authenticator` | The authenticator which Gravitino uses, setting as `simple` or `oauth` | `simple` | 0.3.0 |-| `gravitino.authenticator.oauth.serviceAudience` | The audience name when Gravitino uses OAuth as the authenticator | `GravitinoServer` | 0.3.0 |-| `gravitino.authenticator.oauth.allowSkewSecs` | The JWT allows skew seconds when Gravitino uses OAuth as the authenticator | `0` | 0.3.0 |-| `gravitino.authenticator.oauth.defaultSignKey` | The signing key of JWT when Gravitino uses OAuth as the authenticator | `` | 0.3.0 |-| `gravitino.authenticator.oauth.serverUri` | The uri of the default OAuth server | `` | 0.3.0 |-| `gravitino.authenticator.oauth.tokenPath` | The path for token of the default OAuth server | `` | 0.3.0 |+| Configuration item | Description | Default value | Since version |+|---------------------------------------------------|-----------------------------------------------------------------------------|-------------------|---------------|+| `gravitino.authenticator` | The authenticator which Gravitino uses, setting as `simple` or `oauth`. | `simple` | 0.3.0 |+| `gravitino.authenticator.oauth.serviceAudience` | The audience name when Gravitino uses OAuth as the authenticator. | `GravitinoServer` | 0.3.0 |+| `gravitino.authenticator.oauth.allowSkewSecs` | The JWT allows skew seconds when Gravitino uses OAuth as the authenticator. | `0` | 0.3.0 |+| `gravitino.authenticator.oauth.defaultSignKey` | The signing key of JWT when Gravitino uses OAuth as the authenticator. | `` | 0.3.0 |+| `gravitino.authenticator.oauth.signAlgorithmType` | The signature algorithm when Gravitino uses OAuth as the authenticator. | `RS256` | 0.3.0 |+| `gravitino.authenticator.oauth.serverUri` | The uri of the default OAuth server | `` | 0.3.0 |+| `gravitino.authenticator.oauth.tokenPath` | The path for token of the default OAuth server | `` | 0.3.0 |The signature algorithms that Gravitino supports follows:diff --git a/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java b/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.javaindex b4a4d7dcdc..823277b23e 100644--- a/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java+++ b/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java@@ -16,28 +16,28 @@ public interface OAuthConfig extends Configs {ConfigEntry<String> SERVICE_AUDIENCE =new ConfigBuilder(OAUTH_CONFIG_PREFIX + "serviceAudience")- .doc("The audience name when Gravitino uses oauth as the authenticator")+ .doc("The audience name when Gravitino uses OAuth as the authenticator").version("0.3.0").stringConf().createWithDefault("GravitinoServer");ConfigEntry<Long> ALLOW_SKEW_SECONDS =new ConfigBuilder(OAUTH_CONFIG_PREFIX + "allowSkewSecs")- .doc("The jwt allows skew seconds when Gravitino uses oauth as the authenticator")+ .doc("The JWT allows skew seconds when Gravitino uses OAuth as the authenticator").version("0.3.0").longConf().createWithDefault(0L);ConfigEntry<String> DEFAULT_SIGN_KEY =new ConfigBuilder(OAUTH_CONFIG_PREFIX + "defaultSignKey")- .doc("The sign key of jwt when Gravitino uses oauth as the authenticator")+ .doc("The signing key of JWT when Gravitino uses OAuth as the authenticator").version("0.3.0").stringConf().createWithDefault("");ConfigEntry<String> SIGNATURE_ALGORITHM_TYPE =new ConfigBuilder(OAUTH_CONFIG_PREFIX + "signAlgorithmType")- .doc("The signature algorithm when Gravitino uses oauth as the authenticator")+ .doc("The signature algorithm when Gravitino uses OAuth as the authenticator").version("0.3.0").stringConf().createWithDefault(SignatureAlgorithm.RS256.name());diff --git a/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java b/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.javaindex dd75003df2..308f226349 100644--- a/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java+++ b/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java@@ -40,7 +40,7 @@ public final class JettyServerConfig {public static final ConfigEntry<Integer> WEBSERVER_MIN_THREADS =new ConfigBuilder("minThreads")- .doc("The min thread size of the Jetty web server")+ .doc("The minimum number of threads in the thread pool used by Jetty webserver").version("0.2.0").intConf().createWithDefault(@@ -48,42 +48,42 @@ public final class JettyServerConfig {public static final ConfigEntry<Integer> WEBSERVER_MAX_THREADS =new ConfigBuilder("maxThreads")- .doc("The max thread size of the Jetty web server")+ .doc("The maximum number of threads in the thread pool used by Jetty webserver").version("0.1.0").intConf().createWithDefault(Math.max(Runtime.getRuntime().availableProcessors() * 4, 400));public static final ConfigEntry<Long> WEBSERVER_STOP_TIMEOUT =new ConfigBuilder("stopTimeout")- .doc("The stop wait timeout of the Jetty web server")+ .doc("Time in milliseconds to gracefully shutdown the Jetty webserver").version("0.2.0").longConf().createWithDefault(30 * 1000L);public static final ConfigEntry<Integer> WEBSERVER_IDLE_TIMEOUT =new ConfigBuilder("idleTimeout")- .doc("The timeout of idle connections")+ .doc("The timeout in milliseconds of idle connections").version("0.2.0").intConf().createWithDefault(30 * 1000);public static final ConfigEntry<Integer> WEBSERVER_REQUEST_HEADER_SIZE =new ConfigBuilder("requestHeaderSize")- .doc("The request header size of the Jetty web server")+ .doc("Maximum size of HTTP requests").version("0.1.0").intConf().createWithDefault(128 * 1024);public static final ConfigEntry<Integer> WEBSERVER_RESPONSE_HEADER_SIZE =new ConfigBuilder("responseHeaderSize")- .doc("The response header size of the Jetty web server")+ .doc("Maximum size of HTTP responses").version("0.1.0").intConf().createWithDefault(128 * 1024);public static final ConfigEntry<Integer> WEBSERVER_THREAD_POOL_WORK_QUEUE_SIZE =new ConfigBuilder("threadPoolWorkQueueSize")- .doc("The executor thread pool work queue size of the Jetty web server")+ .doc("The size of the queue in the thread pool used by Jetty webserver").version("0.1.0").intConf().createWithDefault(100);