diqiu50 commented on code in PR #13302:
URL: https://github.com/apache/gravitino/pull/13302#discussion_r4044692264


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoConfig.java:
##########
@@ -379,14 +414,33 @@ public Map<String, String> getClientConfig() {
   }
 
   /**
-   * Retrieves the single metalake mode.
+   * Whether Trino catalog names carry the metalake, as {@code 
"<metalake>.<catalog>"}. The
+   * deprecated {@code gravitino.use-single-metalake=false} is honored when 
the new key is unset.
    *
-   * @return the single metalake mode
+   * @return true if catalog names are qualified with the metalake
    */
-  public boolean singleMetalakeMode() {
-    return Boolean.parseBoolean(
-        config.getOrDefault(
-            GRAVITINO_SINGLE_METALAKE_MODE.key, 
GRAVITINO_SINGLE_METALAKE_MODE.defaultValue));
+  public boolean catalogNameWithMetalake() {
+    String value = config.get(GRAVITINO_CATALOG_NAME_WITH_METALAKE.key);
+    if (value != null) {
+      return parseBooleanConfig(GRAVITINO_CATALOG_NAME_WITH_METALAKE.key, 
value.trim());
+    }
+    return !parseBooleanConfig(
+        GRAVITINO_SINGLE_METALAKE_MODE.key,
+        config
+            .getOrDefault(
+                GRAVITINO_SINGLE_METALAKE_MODE.key, 
GRAVITINO_SINGLE_METALAKE_MODE.defaultValue)
+            .trim());
+  }

Review Comment:
   For now, I'd prefer not to make too many changes to the existing 
multi-metalake mode.



-- 
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