FANNG1 commented on code in PR #8696:
URL: https://github.com/apache/gravitino/pull/8696#discussion_r2434485032


##########
iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/cache/BaseMetadataCache.java:
##########
@@ -0,0 +1,80 @@
+/*
+ *  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.iceberg.common.cache;
+
+import org.apache.iceberg.TableMetadata;
+import org.apache.iceberg.catalog.TableIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Abstract base class implementing {@link MetadataCache} that provides core 
metadata caching
+ * functionality with validation of metadata location against the latest 
version.
+ */
+public abstract class BaseMetadataCache implements MetadataCache {

Review Comment:
   updated



##########
docs/iceberg-rest-service.md:
##########
@@ -420,6 +421,18 @@ Gravitino provides a pluggable metrics store interface to 
store and delete Icebe
 | `gravitino.iceberg-rest.metricsStoreRetainDays` | The days to retain Iceberg 
metrics in store, the value not greater than 0 means retain forever.            
                         | -1            | No       | 0.4.0         |
 | `gravitino.iceberg-rest.metricsQueueCapacity`   | The size of queue to store 
metrics temporally before storing to the persistent storage. Metrics will be 
dropped when queue is full. | 1000          | No       | 0.4.0         |
 
+### Iceberg table metadata cache configuration
+
+Gravitino features a pluggable cache system for updating or retrieving table 
metadata caches. It validates the location of table metadata against the 
catalog backend to ensure the correctness of cached data.
+
+| Configuration item                                           | Description   
                              | Default value | Required | Since Version |
+|--------------------------------------------------------------|---------------------------------------------|---------------|----------|---------------|
+| `gravitino.iceberg-rest.table-metadata-cache-impl`           | The implement 
of the cache.                 | (none)        | No       | 1.1.0         |
+| `gravitino.iceberg-rest.table-metadata-cache-capacity`       | The capacity 
of table metadata cache.       | 200           | No       | 1.1.0         |
+| `gravitino.iceberg-rest.table-metadata-cache-expire-minutes` | The expire 
minutes of table metadata cache. | 60            | No       | 1.1.0         |
+
+Gravitino provides build-in 
`org.apache.gravitino.iceberg.common.cache.LocalMetadataCache` to store the 
cache data in local memory. And you could implement your custom cache by 
implementing `org.apache.gravitino.iceberg.common.cache.MetadataCache` 
interface.

Review Comment:
   updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to