World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#7180] improvement(doc): Add docs support (#7460)
Lord of Abyss5c68e49fb061
diff --git a/docs/gravitino-server-config.md b/docs/gravitino-server-config.mdindex eb25843246..e5599f6685 100644--- a/docs/gravitino-server-config.md+++ b/docs/gravitino-server-config.md@@ -75,6 +75,56 @@ We strongly recommend that you change the default value of `gravitino.entity.stoFor H2 database, All tables needed by Gravitino are created automatically when the Gravitino server starts up. For MySQL, you should firstly initialize the database tables yourself by executing the ddl scripts in the `${GRAVITINO_HOME}/scripts/mysql/` directory.+### Storage cache configuration++To enable storage caching, please modify the following settings in the `${GRAVITINO_HOME}/conf/gravitino.conf` file:++```+# Whether to enable the cache+gravitino.cache.enabled=true++# Specify the cache implementation (no need to use the fully qualified class name)+gravitino.cache.implementation=caffeine+```++| Configuration Key | Description | Default Value | Required | Since Version |+|----------------------------------|--------------------------------------------|------------------------|----------|---------------|+| `gravitino.cache.enabled` | Whether to enable caching | `true` | Yes | 1.0.0 |+| `gravitino.cache.implementation` | Specifies the cache implementation | `caffeine` | Yes | 1.0.0 |+| `gravitino.cache.maxEntries` | Maximum number of entries allowed in cache | `10000` | No | 1.0.0 |+| `gravitino.cache.expireTimeInMs` | Cache expiration time (in milliseconds) | `3600000` (about 1 hr) | No | 1.0.0 |+| `gravitino.cache.enableStats` | Whether to enable cache statistics logging | `false` | No | 1.0.0 |+| `gravitino.cache.enableWeigher` | Whether to enable weight-based eviction | `true` | No | 1.0.0 |++- `gravitino.cache.enableWeigher`: When enabled, eviction is based on weight and `maxEntries` will be ignored.+- `gravitino.cache.expireTimeInMs`: Controls the cache TTL in milliseconds.+- If `gravitino.cache.enableStats` is enabled, Gravitino will log cache statistics (hit count, miss count, load failures, etc.) every 5 minutes at the Info level.++#### Eviction strategies++Gravitino supports multiple eviction strategies including capacity-based, weight-based, and time-based (TTL) eviction. The following describes how they work with Caffeine:++##### Capacity-based eviction++When `gravitino.cache.enableWeigher` is **disabled**, Gravitino limits the number of cached entries using `gravitino.cache.maxEntries` and employs Caffeine’s W-TinyLFU eviction policy to remove the least-used entries when the cache is full.++##### Weight-based eviction++When `gravitino.cache.enableWeigher` is **enabled**, Gravitino uses a combination of `maximumWeight` and a custom weigher to control the total weight of the cache:++- Each entity type has a default weight (e.g., Metalake > Catalog > Schema);+- Entries are evicted based on the combined weight limit (`maximumWeight`);+- If a single cache item exceeds the total weight limit, it will not be cached;+- When this strategy is active, `maxEntries` will be ignored.++##### Time-based eviction++All cache entries are subject to a TTL (Time-To-Live) expiration policy. By default, the TTL is `3600000ms` (1 hour) and can be adjusted via the `gravitino.cache.expireTimeInMs` setting:++- TTL starts at the time of entry creation; once it exceeds the configured duration, the entry expires automatically;+- TTL can work in conjunction with both capacity and weight-based eviction;+- Expired entries will also trigger asynchronous cleanup mechanisms for resource release and logging.+### Tree lock configurationGravitino server uses tree lock to ensure the consistency of the data. The tree lock is a memory lock (Currently, Gravitino only supports in memory lock) that can be used to ensure the consistency of the data in Gravitino server. The configuration items are as follows: