Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#849] docs(core): refactor gravitino server configuration (#1092)

FANNG80fe57ae356c
diff --git a/docs/gravitino-server-config.md b/docs/gravitino-server-config.md
index 9f3d1bf40e..b1db7a9f67 100644
--- a/docs/gravitino-server-config.md
+++ b/docs/gravitino-server-config.md
@@ -1,55 +1,107 @@
---
-title: "How to customize Gravitino server configurations"
-date: 2023-10-03T09:03:20-08:00
+title: Gravitino configuration
+slug: /gravitino-server-config
+keywords:
+ - configuration
license: "Copyright 2023 Datastrato Pvt Ltd.
This software is licensed under the Apache License version 2."
---
-## How to configure Gravitino server configurations
+## Introduction
-You can customize the Gravitino server by editing the configuration file `gravitino.conf` in the `conf` directory. The default values are sufficient for most use cases and don't need modification.
-It's strongly recommended to read the following sections to understand the configuration file and change the default values to suit your specific situation and usage scenario.
-
-## Configuration file
+Gravitino supports several configurations:
+1. **Gravitino server configuration**: Used to start up Gravition server.
+2. **Gravitino catalog properties configuration**: Used to make default values for different catalogs.
+3. **Some other configurations**: Includes configurations such as HDFS configuration.
-The file located in `conf/gravitino.conf` is the main configuration file for the Gravitino server.
+## Gravitino server configurations
-## Configuration items
+You can customize the Gravitino server by editing the configuration file `gravitino.conf` in the `conf` directory. The default values are sufficient for most use cases and don't need modification.
+It's strongly recommended to read the following sections to understand the configuration file and change the default values to suit your specific situation and usage scenario.
The `gravitino.conf` file lists the configuration items in the following table. It groups those items into the following categories:
-### Server configuration
-
-| Configuration item | Description | Default value | Since version |
-|------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|---------------|
-| `gravitino.server.webserver.host` | The host of Gravitino server. | `0.0.0.0` | 0.1.0 |
-| `gravitino.server.webserver.httpPort` | The port on which the Gravitino server listens for incoming connections. | `8090` | 0.1.0 |
-| `gravitino.server.webserver.minThreads` | The minimum number of threads in the thread pool used by Jetty webserver. `minThreads` is 8 if the value is less than 8. | `Math.max(Math.min(Runtime.getRuntime().availableProcessors() * 2, 100), 8)` | 0.2.0 |
-| `gravitino.server.webserver.maxThreads` | The maximum number of threads in the thread pool used by Jetty webserver. `maxThreads` is 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. | `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 |
+### Gravitino HTTP Server configuration
+
+| Configuration item | Description | Default value | Required | Since version |
+|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|---------------|
+| `gravitino.server.webserver.host` | The host of Gravitino server. | `0.0.0.0` | No | 0.1.0 |
+| `gravitino.server.webserver.httpPort` | The port on which the Gravitino server listens for incoming connections. | `8090` | No | 0.1.0 |
+| `gravitino.server.webserver.minThreads` | The minimum number of threads in the thread pool used by Jetty webserver. `minThreads` is 8 if the value is less than 8. | `Math.max(Math.min(Runtime.getRuntime().availableProcessors() * 2, 100), 8)` | No | 0.2.0 |
+| `gravitino.server.webserver.maxThreads` | The maximum number of threads in the thread pool used by Jetty webserver. `maxThreads` is 8 if the value is less than 8, and `maxThreads` must be great or equal to `minThreads`. | `Math.max(Runtime.getRuntime().availableProcessors() * 4, 400)` | No | 0.1.0 |
+| `gravitino.server.webserver.threadPoolWorkQueueSize` | The size of the queue in the thread pool used by Jetty webserver. | `100` | No | 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` | No | 0.2.0 |
+| `gravitino.server.webserver.idleTimeout` | The timeout in milliseconds of idle connections. | `30000` | No | 0.2.0 |
+| `gravitino.server.webserver.requestHeaderSize` | Maximum size of HTTP requests. | `131072` | No | 0.1.0 |
+| `gravitino.server.webserver.responseHeaderSize` | Maximum size of HTTP responses. | `131072` | No | 0.1.0 |
+| `gravitino.server.shutdown.timeout` | Time in milliseconds to gracefully shutdown of the Gravitino webserver. | `3000` | No | 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 |
-| `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 |
-| `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 |
+| Configuration item | Description | Default value | Required | Since version |
+|---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------|----------|---------------|
+| `gravitino.entity.store` | Which storage implementation to use, currently supported is key-value pair storage, the default value is `kv`. | `kv` | No | 0.1.0 |
+| `gravitino.entity.store.kv` | Detailed implementation of KV storage, currently supported is `RocksDB` storage implementation `RocksDBKvBackend`. | `RocksDBKvBackend` | No | 0.1.0 |
+| `gravitino.entity.store.kv.rocksdbPath` | Directory path of `RocksDBKvBackend`. | `${GRAVITINO_HOME}/data/rocksdb` | No | 0.1.0 |
+| `graivitino.entity.serde` | The serialization/deserialization class used to support entity storage, currently supported is `proto`. | `proto` | No | 0.1.0 |
+| `gravitino.entity.store.maxTransactionSkewTimeMs` | The maximum skew time of transactions in milliseconds. | `2000` | No | 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) | No | 0.3.0 |
+
+:::caution
+It's highly recommend that you change the default value of `gravitino.entity.store.kv.rocksdbPath`, as it's under the deployment directory and future version upgrades may remove it.
+:::
### Catalog configuration
-| Configuration item | Description | Default value | Since version |
-|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|---------------|
-| `gravitino.catalog.cache.evictionIntervalMs` | The interval in milliseconds to evict the catalog cache, default 3600000 ms or 1 hour. | `3600000` | 0.1.0 |
-| `gravitino.catalog.classloader.isolated` | Whether to use an isolated classloader for catalog, if true, an isolated classloader loads all catalog-related libraries and configurations, not the AppClassLoader. The default value is `true`. | `true` | 0.1.0 |
+| Configuration item | Description | Default value | Required | Since version |
+|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|----------|---------------|
+| `gravitino.catalog.cache.evictionIntervalMs` | The interval in milliseconds to evict the catalog cache, default 3600000ms(1h) | `3600000` | No | 0.1.0 |
+| `gravitino.catalog.classloader.isolated` | Whether to use an isolated classloader for catalog, if true, an isolated classloader loads all catalog-related libraries and configurations, not the AppClassLoader. The default value is `true`. | `true` | No | 0.1.0 |
+
+### Auxiliary service configuration
+
+| Configuration item | Description | Default value | Since Version |
+|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------|---------------|---------------|
+| `gravitino.auxService.names ` | The auxiliary service name of the Gravitino Iceberg REST server, use **`iceberg-rest`** for the Gravitino Iceberg REST server. | (none) | 0.2.0 |
+
+Please refer to [Iceberg REST catalog service](iceberg-rest-service) for Iceberg rest catalog service configurations.
+
+### Security configuration
+
+Please refer to [security](security) for HTTPS and Authentication configurations.
+
+## Gravitino catalog properties configuration
+
+There are three types of catalog properties:
+
+1. **Gravitino-defined properties**: These properties simplify the catalog creation process.
+2. **Properties with the `gravitino.bypass.` prefix**: These properties are not managed by Gravitino; instead, they bypass the underlying system for advanced usage.
+3. **Other properties**: Stored in Gravitino storage, these properties do not bypass the underlying system.
+
+Catalog properties are either defined in catalog configuration files as default values or specified explicitly when creating a catalog.
+
+:::info
+Explicit specifications take precedence over the formal configurations.
+:::
+
+:::caution
+These rules only apply on the catalog properties, doesn't affect on the schema or table properties.
+:::
+
+| catalog provider | catalog properties | catalog properties configuration file path |
+|---------------------|--------------------------------------------------------------------------------------|----------------------------------------------------------|
+| `hive` | [Hive catalog properties](apache-hive-catalog#catalog-properties) | `catalogs/hive/conf/hive.conf` |
+| `lakehouse-iceberg` | [Lakehouse Iceberg catalog properties](lakehouse-iceberg-catalog#catalog-properties) | `catalogs/lakehouse-iceberg/conf/lakehouse-iceberg.conf` |
+| `jdbc-mysql` | [MySQL catalog properties](jdbc-mysql-catalog#catalog-properties) | `catalogs/jdbc-mysql/conf/jdbc-mysql.conf` |
+| `jdbc-postgresql` | [PostgresSQL catalog properties](jdbc-postgresql-catalog#catalog-properties) | `catalogs/jdbc-postgresql/conf/jdbc-postgresql.conf` |
+
+:::info
+Gravition server automatically add catalog properties configuration dir to classpath.
+:::
+
+## Some other configurations
+
+You could put HDFS configuration file to catalog properties configuration dir, like `catalogs/lakehouse-iceberg/conf/`.
## How to set up runtime environment variables
@@ -62,4 +114,4 @@ Apache Hadoop access. Please ensure that the user starting the Gravitino server
permissions; otherwise, you may encounter a `Permission denied` error. There are also several ways to resolve this error:
* Granting the Gravitino startup user permissions in Hadoop
-* Specify the authorized Hadoop username in the environment variables `HADOOP_USER_NAME` before starting the Gravitino server.
+* Specify the authorized Hadoop username in the environment variables `HADOOP_USER_NAME` before starting the Gravitino server.
\ No newline at end of file
diff --git a/docs/lakehouse-iceberg-catalog.md b/docs/lakehouse-iceberg-catalog.md
index 995d72a5e5..aa3a5791f0 100644
--- a/docs/lakehouse-iceberg-catalog.md
+++ b/docs/lakehouse-iceberg-catalog.md
@@ -53,7 +53,7 @@ If you are using JDBC catalog, you must provide `jdbc-user`, `jdbc-password` and
| `jdbc-initialize` | Whether to initialize meta tables when create Jdbc catalog | `true` | No | 0.2.0 |
:::caution
-Your must download the corresponding JDBC driver to the `catalogs/lakehouse-iceberg/libs` directory.
+You must download the corresponding JDBC driver to the `catalogs/lakehouse-iceberg/libs` directory.
:::
### Catalog operations
@@ -140,7 +140,7 @@ Apache Iceberg doesn't support Gravitino `Varchar` `Fixedchar` `Byte` `Short` `U
:::
-## Table properties
+### Table properties
You can pass [Iceberg table properties](https://iceberg.apache.org/docs/1.3.1/configuration/) to Gravitino when creating Iceberg table.
@@ -156,9 +156,9 @@ Gravitino server reserves the following fields which can't be passed.
| `sort-order` | Selecting a specific snapshot in a merge operation. |
| `identifier-fields` | The identifier fields for defining the table. |
-## Table operations
+### Table operations
-### Alter table operations
+#### Alter table operations
Supports operations:
- `RenameTable`
@@ -191,4 +191,4 @@ You can place `core-site.xml` and `hdfs-site.xml` in the `catalogs/lakehouse-ice
:::caution
When writing to HDFS, the Gravitino Iceberg REST server can only operate as the specified HDFS user and doesn't support proxying to other HDFS users. See [How to access Apache Hadoop](gravitino-server-config) for more details.
-:::
\ No newline at end of file
+:::