diff --git a/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java b/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java index 406c9793021b..e95e2580361d 100644 --- a/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java +++ b/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java @@ -51,6 +51,7 @@ *
  • warehouse - the warehouse path (Hadoop catalog only)
  • *
  • default-database - a database name to use as the default
  • *
  • base-namespace - a base namespace as the prefix for all databases (Hadoop catalog only)
  • + *
  • cache-enabled - whether to enable catalog cache
  • * *

    * To use a custom catalog that is not a Hive or Hadoop catalog, extend this class and override diff --git a/site/docs/flink.md b/site/docs/flink.md index 8836154696f6..34ee50255043 100644 --- a/site/docs/flink.md +++ b/site/docs/flink.md @@ -196,6 +196,7 @@ CREATE CATALOG hive_catalog WITH ( * `property-version`: Version number to describe the property version. This property can be used for backwards compatibility in case the property format changes. The current property version is `1`. (Optional) * `warehouse`: The Hive warehouse location, users should specify this path if neither set the `hive-conf-dir` to specify a location containing a `hive-site.xml` configuration file nor add a correct `hive-site.xml` to classpath. * `hive-conf-dir`: Path to a directory containing a `hive-site.xml` configuration file which will be used to provide custom Hive configuration values. The value of `hive.metastore.warehouse.dir` from `/hive-site.xml` (or hive configure file from classpath) will be overwrote with the `warehouse` value if setting both `hive-conf-dir` and `warehouse` when creating iceberg catalog. +* `cache-enabled`: Whether to enable catalog cache, default value is `true` ### Hadoop catalog diff --git a/site/docs/spark-configuration.md b/site/docs/spark-configuration.md index 0ae27cacfacb..dd633f189516 100644 --- a/site/docs/spark-configuration.md +++ b/site/docs/spark-configuration.md @@ -59,6 +59,7 @@ Both catalogs are configured using properties nested under the catalog name. Com | spark.sql.catalog._catalog-name_.default-namespace | default | The default current namespace for the catalog | | spark.sql.catalog._catalog-name_.uri | thrift://host:port | Metastore connect URI; default from `hive-site.xml` | | spark.sql.catalog._catalog-name_.warehouse | hdfs://nn:8020/warehouse/path | Base path for the warehouse directory | +| spark.sql.catalog._catalog-name_.cache-enabled | `true` or `false` | Whether to enable catalog cache, default value is `true` | Additional properties can be found in common [catalog configuration](./configuration.md#catalog-properties). diff --git a/spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java b/spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java index ac7e6e989c68..e8c7db75a581 100644 --- a/spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java +++ b/spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java @@ -72,6 +72,7 @@ *

  • uri - the Hive Metastore URI (Hive catalog only)
  • *
  • warehouse - the warehouse path (Hadoop catalog only)
  • *
  • default-namespace - a namespace to use as the default
  • + *
  • cache-enabled - whether to enable catalog cache
  • * *

    * To use a custom catalog that is not a Hive or Hadoop catalog, extend this class and override