From cf8942b20f625be204f0142a9816d0cf7a30630a Mon Sep 17 00:00:00 2001 From: Yann Date: Fri, 8 Mar 2024 11:52:46 +0800 Subject: [PATCH] rename config --- .../generated/spark_connector_configuration.html | 4 ++-- .../org/apache/paimon/spark/SparkConnectorOptions.java | 6 +++--- .../java/org/apache/paimon/spark/SparkGenericCatalog.java | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/layouts/shortcodes/generated/spark_connector_configuration.html b/docs/layouts/shortcodes/generated/spark_connector_configuration.html index cbb96c1f0fa08..09d363aff0c40 100644 --- a/docs/layouts/shortcodes/generated/spark_connector_configuration.html +++ b/docs/layouts/shortcodes/generated/spark_connector_configuration.html @@ -75,10 +75,10 @@ If true, allow to merge data types if the two types meet the rules for explicit casting. -
catalog.inner-session-catalog
+
catalog.create-underlying-session-catalog
false Boolean - If true, create and use an inner session catalog instead of default session catalog when use SparkGenericCatalog. + If true, create and use an underlying session catalog instead of default session catalog when use SparkGenericCatalog. diff --git a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkConnectorOptions.java b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkConnectorOptions.java index d72f628cbdde5..e553fb50747dc 100644 --- a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkConnectorOptions.java +++ b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkConnectorOptions.java @@ -25,12 +25,12 @@ /** Options for spark connector. */ public class SparkConnectorOptions { - public static final ConfigOption INNER_SESSION_CATALOG = - key("catalog.inner-session-catalog") + public static final ConfigOption CREATE_UNDERLYING_SESSION_CATALOG = + key("catalog.create-underlying-session-catalog") .booleanType() .defaultValue(false) .withDescription( - "If true, create and use an inner session catalog instead of default session catalog when use SparkGenericCatalog."); + "If true, create and use an underlying session catalog instead of default session catalog when use SparkGenericCatalog."); public static final ConfigOption MERGE_SCHEMA = key("write.merge-schema") .booleanType() diff --git a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkGenericCatalog.java b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkGenericCatalog.java index 4597a7452103e..b3992c210499a 100644 --- a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkGenericCatalog.java +++ b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkGenericCatalog.java @@ -80,7 +80,7 @@ public class SparkGenericCatalog extends SparkBaseCatalog implements CatalogExte private SparkCatalog sparkCatalog = null; - private boolean enableInnerSessionCatalog = false; + private boolean underlyingSessionCatalogEnabled = false; private CatalogPlugin sessionCatalog = null; @@ -251,8 +251,8 @@ public final void initialize(String name, CaseInsensitiveStringMap options) { autoFillConfigurations(options, sessionState.conf(), hadoopConf); sparkCatalog.initialize(name, newOptions); - if (options.getBoolean(SparkConnectorOptions.INNER_SESSION_CATALOG.key(), false)) { - this.enableInnerSessionCatalog = true; + if (options.getBoolean(SparkConnectorOptions.CREATE_UNDERLYING_SESSION_CATALOG.key(), false)) { + this.underlyingSessionCatalogEnabled = false; for (Map.Entry entry : options.entrySet()) { sparkConf.set("spark.hadoop." + entry.getKey(), entry.getValue()); hadoopConf.set(entry.getKey(), entry.getValue()); @@ -298,7 +298,7 @@ private void fillCommonConfigurations(Map options, SQLConf sqlCo @Override @SuppressWarnings("unchecked") public void setDelegateCatalog(CatalogPlugin delegate) { - if (!enableInnerSessionCatalog) { + if (!underlyingSessionCatalogEnabled) { this.sessionCatalog = delegate; } }