diff --git a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java index 7f57bc27314..76da44980f3 100644 --- a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java +++ b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java @@ -72,4 +72,8 @@ public JdbcConfig(Map properties) { loadFromMap(properties, k -> true); assert null != getJdbcUrl(); } + + public Map getAllProperties() { + return getConfigsWithPrefix(""); + } } diff --git a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/utils/DataSourceUtils.java b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/utils/DataSourceUtils.java index 98ecf8284f7..cac1c080243 100644 --- a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/utils/DataSourceUtils.java +++ b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/utils/DataSourceUtils.java @@ -57,8 +57,7 @@ private static DataSource createDBCPDataSource(JdbcConfig jdbcConfig) throws Exc private static Properties getProperties(JdbcConfig jdbcConfig) { Properties properties = new Properties(); - Map configsWithPrefix = jdbcConfig.getConfigsWithPrefix(""); - properties.putAll(configsWithPrefix); + properties.putAll(jdbcConfig.getAllProperties()); return properties; }