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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/maxcompute/MaxComputeExternalCatalog.java:
##########
@@ -45,87 +50,65 @@
 
 public class MaxComputeExternalCatalog extends ExternalCatalog {
     private Odps odps;
-    private TableTunnel tunnel;
-    @SerializedName(value = "region")
-    private String region;
+
     @SerializedName(value = "accessKey")
     private String accessKey;

Review Comment:
   I think these 2 fields no need to persist.
   All property should be persisited in CatalogProperty



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/maxcompute/MaxComputeExternalCatalog.java:
##########
@@ -45,87 +50,65 @@
 
 public class MaxComputeExternalCatalog extends ExternalCatalog {
     private Odps odps;
-    private TableTunnel tunnel;
-    @SerializedName(value = "region")
-    private String region;
+
     @SerializedName(value = "accessKey")
     private String accessKey;
     @SerializedName(value = "secretKey")
     private String secretKey;
-    @SerializedName(value = "publicAccess")
-    private boolean enablePublicAccess;
-    private static final String odpsUrlTemplate = 
"http://service.{}.maxcompute.aliyun-inc.com/api";;
-    private static final String tunnelUrlTemplate = 
"http://dt.{}.maxcompute.aliyun-inc.com";;
-    private static String odpsUrl;
-    private static String tunnelUrl;
+    private String endpoint;
+    private String catalogOwner = "";
+    private String defaultProject;
+    String quota;
+
+    public  EnvironmentSettings settings;
+
     private static final List<String> REQUIRED_PROPERTIES = ImmutableList.of(
-            MCProperties.REGION,
-            MCProperties.PROJECT
+            MCProperties.PROJECT,
+            MCProperties.QUOTA,
+            MCProperties.ENDPOINT
     );
 
     public MaxComputeExternalCatalog(long catalogId, String name, String 
resource, Map<String, String> props,
                                      String comment) {
         super(catalogId, name, InitCatalogLog.Type.MAX_COMPUTE, comment);
         catalogProperty = new CatalogProperty(resource, props);
-        odpsUrl = props.getOrDefault(MCProperties.ODPS_ENDPOINT, "");
-        tunnelUrl = props.getOrDefault(MCProperties.TUNNEL_SDK_ENDPOINT, "");
     }
 
     @Override
     protected void initLocalObjectsImpl() {
         Map<String, String> props = catalogProperty.getProperties();
-        String region = props.get(MCProperties.REGION);
-        String defaultProject = props.get(MCProperties.PROJECT);
-        if (Strings.isNullOrEmpty(region)) {
-            throw new IllegalArgumentException("Missing required property '" + 
MCProperties.REGION + "'.");
-        }
+
+        defaultProject = props.get(MCProperties.PROJECT);
+        quota = props.get(MCProperties.QUOTA);
+        endpoint = props.getOrDefault(MCProperties.ENDPOINT, "");
+
         if (Strings.isNullOrEmpty(defaultProject)) {
             throw new IllegalArgumentException("Missing required property '" + 
MCProperties.PROJECT + "'.");
         }
-        if (region.startsWith("oss-")) {
-            // may use oss-cn-beijing, ensure compatible
-            region = region.replace("oss-", "");
+        if (Strings.isNullOrEmpty(quota)) {

Review Comment:
   Is there a default value for QUOTA?



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to