morningman commented on code in PR #59502:
URL: https://github.com/apache/doris/pull/59502#discussion_r2659256731


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/IcebergJdbcMetaStoreProperties.java:
##########
@@ -0,0 +1,310 @@
+// 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.doris.datasource.property.metastore;
+
+import org.apache.doris.catalog.JdbcResource;
+import org.apache.doris.datasource.iceberg.IcebergExternalCatalog;
+import org.apache.doris.datasource.property.ConnectorProperty;
+import 
org.apache.doris.datasource.property.storage.AbstractS3CompatibleProperties;
+import org.apache.doris.datasource.property.storage.StorageProperties;
+
+import com.google.common.collect.Maps;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.aws.AwsClientProperties;
+import org.apache.iceberg.aws.s3.S3FileIOProperties;
+import org.apache.iceberg.catalog.Catalog;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class IcebergJdbcMetaStoreProperties extends AbstractIcebergProperties {
+    private static final Logger LOG = 
LogManager.getLogger(IcebergJdbcMetaStoreProperties.class);
+
+    private static final String JDBC_PREFIX = "jdbc.";
+    private static final Map<URL, ClassLoader> DRIVER_CLASS_LOADER_CACHE = new 
ConcurrentHashMap<>();
+
+    private Map<String, String> icebergJdbcCatalogProperties;
+
+    @ConnectorProperty(
+            names = {"uri", "iceberg.jdbc.uri"},
+            required = true,
+            description = "JDBC connection URI for the Iceberg JDBC catalog."
+    )
+    private String uri = "";
+
+    @ConnectorProperty(
+            names = {"jdbc.user"},
+            required = false,
+            description = "Username for the Iceberg JDBC catalog."
+    )
+    private String jdbcUser;
+
+    @ConnectorProperty(
+            names = {"jdbc.password"},
+            required = false,
+            sensitive = true,
+            description = "Password for the Iceberg JDBC catalog."
+    )
+    private String jdbcPassword;
+
+    @ConnectorProperty(
+            names = {"jdbc.init-catalog-tables"},
+            required = false,
+            description = "Whether to create catalog tables if they do not 
exist."
+    )
+    private String jdbcInitCatalogTables;
+
+    @ConnectorProperty(
+            names = {"jdbc.schema-version"},
+            required = false,
+            description = "Iceberg JDBC catalog schema version (V0/V1)."
+    )
+    private String jdbcSchemaVersion;
+
+    @ConnectorProperty(
+            names = {"jdbc.strict-mode"},
+            required = false,
+            description = "Whether to enforce strict JDBC catalog schema 
checks."
+    )
+    private String jdbcStrictMode;
+
+    @ConnectorProperty(
+            names = {"driver_url"},
+            required = false,
+            description = "JDBC driver JAR file path or URL. "
+                    + "Can be a local file name (will look in 
$DORIS_HOME/plugins/jdbc_drivers/) "
+                    + "or a full URL (http://, https://, file://)."
+    )
+    private String driverUrl;
+
+    @ConnectorProperty(
+            names = {"driver_class"},

Review Comment:
   ```suggestion
               names = {"iceberg.driver-class"},
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/IcebergJdbcMetaStoreProperties.java:
##########
@@ -0,0 +1,310 @@
+// 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.doris.datasource.property.metastore;
+
+import org.apache.doris.catalog.JdbcResource;
+import org.apache.doris.datasource.iceberg.IcebergExternalCatalog;
+import org.apache.doris.datasource.property.ConnectorProperty;
+import 
org.apache.doris.datasource.property.storage.AbstractS3CompatibleProperties;
+import org.apache.doris.datasource.property.storage.StorageProperties;
+
+import com.google.common.collect.Maps;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.aws.AwsClientProperties;
+import org.apache.iceberg.aws.s3.S3FileIOProperties;
+import org.apache.iceberg.catalog.Catalog;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class IcebergJdbcMetaStoreProperties extends AbstractIcebergProperties {
+    private static final Logger LOG = 
LogManager.getLogger(IcebergJdbcMetaStoreProperties.class);
+
+    private static final String JDBC_PREFIX = "jdbc.";
+    private static final Map<URL, ClassLoader> DRIVER_CLASS_LOADER_CACHE = new 
ConcurrentHashMap<>();
+
+    private Map<String, String> icebergJdbcCatalogProperties;
+
+    @ConnectorProperty(
+            names = {"uri", "iceberg.jdbc.uri"},
+            required = true,
+            description = "JDBC connection URI for the Iceberg JDBC catalog."
+    )
+    private String uri = "";
+
+    @ConnectorProperty(
+            names = {"jdbc.user"},
+            required = false,
+            description = "Username for the Iceberg JDBC catalog."
+    )
+    private String jdbcUser;
+
+    @ConnectorProperty(
+            names = {"jdbc.password"},
+            required = false,
+            sensitive = true,
+            description = "Password for the Iceberg JDBC catalog."
+    )
+    private String jdbcPassword;
+
+    @ConnectorProperty(
+            names = {"jdbc.init-catalog-tables"},

Review Comment:
   For `init-catalog-tables`, `schema-version` and `strict-mode`, do we have 
default values for these config?



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/IcebergJdbcMetaStoreProperties.java:
##########
@@ -0,0 +1,310 @@
+// 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.doris.datasource.property.metastore;
+
+import org.apache.doris.catalog.JdbcResource;
+import org.apache.doris.datasource.iceberg.IcebergExternalCatalog;
+import org.apache.doris.datasource.property.ConnectorProperty;
+import 
org.apache.doris.datasource.property.storage.AbstractS3CompatibleProperties;
+import org.apache.doris.datasource.property.storage.StorageProperties;
+
+import com.google.common.collect.Maps;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.aws.AwsClientProperties;
+import org.apache.iceberg.aws.s3.S3FileIOProperties;
+import org.apache.iceberg.catalog.Catalog;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class IcebergJdbcMetaStoreProperties extends AbstractIcebergProperties {
+    private static final Logger LOG = 
LogManager.getLogger(IcebergJdbcMetaStoreProperties.class);
+
+    private static final String JDBC_PREFIX = "jdbc.";
+    private static final Map<URL, ClassLoader> DRIVER_CLASS_LOADER_CACHE = new 
ConcurrentHashMap<>();
+
+    private Map<String, String> icebergJdbcCatalogProperties;
+
+    @ConnectorProperty(
+            names = {"uri", "iceberg.jdbc.uri"},
+            required = true,
+            description = "JDBC connection URI for the Iceberg JDBC catalog."
+    )
+    private String uri = "";
+
+    @ConnectorProperty(
+            names = {"jdbc.user"},
+            required = false,
+            description = "Username for the Iceberg JDBC catalog."
+    )
+    private String jdbcUser;
+
+    @ConnectorProperty(
+            names = {"jdbc.password"},
+            required = false,
+            sensitive = true,
+            description = "Password for the Iceberg JDBC catalog."
+    )
+    private String jdbcPassword;
+
+    @ConnectorProperty(
+            names = {"jdbc.init-catalog-tables"},
+            required = false,
+            description = "Whether to create catalog tables if they do not 
exist."
+    )
+    private String jdbcInitCatalogTables;
+
+    @ConnectorProperty(
+            names = {"jdbc.schema-version"},
+            required = false,
+            description = "Iceberg JDBC catalog schema version (V0/V1)."
+    )
+    private String jdbcSchemaVersion;
+
+    @ConnectorProperty(
+            names = {"jdbc.strict-mode"},
+            required = false,
+            description = "Whether to enforce strict JDBC catalog schema 
checks."
+    )
+    private String jdbcStrictMode;
+
+    @ConnectorProperty(
+            names = {"driver_url"},

Review Comment:
   ```suggestion
               names = {"iceberg.driver-url"},
   ```
   I know it is diff from JDBC catalog's prop, but we need to keep name 
consistency within this iceberg jdbc catalog.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/IcebergJdbcMetaStoreProperties.java:
##########
@@ -0,0 +1,310 @@
+// 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.doris.datasource.property.metastore;
+
+import org.apache.doris.catalog.JdbcResource;
+import org.apache.doris.datasource.iceberg.IcebergExternalCatalog;
+import org.apache.doris.datasource.property.ConnectorProperty;
+import 
org.apache.doris.datasource.property.storage.AbstractS3CompatibleProperties;
+import org.apache.doris.datasource.property.storage.StorageProperties;
+
+import com.google.common.collect.Maps;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.aws.AwsClientProperties;
+import org.apache.iceberg.aws.s3.S3FileIOProperties;
+import org.apache.iceberg.catalog.Catalog;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class IcebergJdbcMetaStoreProperties extends AbstractIcebergProperties {
+    private static final Logger LOG = 
LogManager.getLogger(IcebergJdbcMetaStoreProperties.class);
+
+    private static final String JDBC_PREFIX = "jdbc.";
+    private static final Map<URL, ClassLoader> DRIVER_CLASS_LOADER_CACHE = new 
ConcurrentHashMap<>();
+
+    private Map<String, String> icebergJdbcCatalogProperties;
+
+    @ConnectorProperty(
+            names = {"uri", "iceberg.jdbc.uri"},
+            required = true,
+            description = "JDBC connection URI for the Iceberg JDBC catalog."
+    )
+    private String uri = "";
+
+    @ConnectorProperty(
+            names = {"jdbc.user"},

Review Comment:
   How about adding `iceberg.` prefix to all properties?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to