You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wsjz (via GitHub)" <gi...@apache.org> on 2023/06/08 07:48:07 UTC

[GitHub] [doris] wsjz opened a new pull request, #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

wsjz opened a new pull request, #20591:
URL: https://github.com/apache/doris/pull/20591

   ## Proposed changes
   
   fix s3 check
   complete catalog properties
   add ut
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] morningman commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1594031150

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] morningman commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1594038276

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] morningman commented on a diff in pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #20591:
URL: https://github.com/apache/doris/pull/20591#discussion_r1229185186


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java:
##########
@@ -373,12 +374,15 @@ private FileCacheValue loadFiles(FileCacheKey key) {
         }
     }
 
-    private JobConf getJobConf() {
-        Configuration configuration = new HdfsConfiguration();
-        for (Map.Entry<String, String> entry : catalog.getCatalogProperty().getHadoopProperties().entrySet()) {
-            configuration.set(entry.getKey(), entry.getValue());
+    private synchronized JobConf getJobConf() {
+        if (jobConf == null) {
+            Configuration configuration = new HdfsConfiguration();
+            for (Map.Entry<String, String> entry : catalog.getCatalogProperty().getHadoopProperties().entrySet()) {
+                configuration.set(entry.getKey(), entry.getValue());

Review Comment:
   There is a problem, that if we alter the catalog's properties, it will never refresh.
   So we need to refresh this jobConf when refreshing the catalog or altering the catalog



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java:
##########
@@ -417,7 +418,8 @@ public ShowResultSet showCatalogs(ShowCatalogStmt showStmt, String currentCtlg)
                 if (!Strings.isNullOrEmpty(catalog.getResource())) {
                     rows.add(Arrays.asList("resource", catalog.getResource()));
                 }
-                for (Map.Entry<String, String> elem : catalog.getProperties().entrySet()) {
+                Map<String, String> sortedMap = new TreeMap<>(catalog.getProperties()).descendingMap();

Review Comment:
   Add comment to explain why using tree map



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/constants/MinioProperties.java:
##########
@@ -0,0 +1,39 @@
+// 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.constants;
+
+import org.apache.doris.datasource.credentials.CloudCredential;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public class MinioProperties extends BaseProperties {
+
+    public static final String MINIO_PREFIX = "minio.";
+    public static final String ENDPOINT = "minio.endpoint";
+    public static final String REGION = "minio.region";

Review Comment:
   minio does not have `region`, we can use an arbitrary one, user no need to set it.



##########
fe/fe-core/src/main/java/org/apache/doris/fs/remote/dfs/DFSFileSystem.java:
##########
@@ -126,7 +126,7 @@ private UserGroupInformation getUgi(Configuration conf) throws UserException {
             String hadoopUserName = conf.get(HdfsResource.HADOOP_USER_NAME);
             if (hadoopUserName == null) {
                 hadoopUserName = "hadoop";
-                LOG.warn("hadoop.username is unset, use default user: hadoop");
+                LOG.warn(HdfsResource.HADOOP_USER_NAME + " is unset, use default user: hadoop");

Review Comment:
   use `debug` level



-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] Jibing-Li commented on a diff in pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "Jibing-Li (via GitHub)" <gi...@apache.org>.
Jibing-Li commented on code in PR #20591:
URL: https://github.com/apache/doris/pull/20591#discussion_r1229339444


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java:
##########
@@ -153,6 +154,8 @@ public HivePartition load(PartitionCacheKey key) throws Exception {
      * generate a filecache and set to fileCacheRef
      */
     public void setNewFileCache() {
+        // init or refresh job conf
+        jobConf = getJobConf();

Review Comment:
   I'm not sure if this change will bring race condition or not. Because the reference of jobConf in getFilesByTransaction and loadFiles may be changed at any time. But I don't think it's a big problem since the refresh frequency is very low.



-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on a diff in pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on code in PR #20591:
URL: https://github.com/apache/doris/pull/20591#discussion_r1229425317


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java:
##########
@@ -153,6 +154,8 @@ public HivePartition load(PartitionCacheKey key) throws Exception {
      * generate a filecache and set to fileCacheRef
      */
     public void setNewFileCache() {
+        // init or refresh job conf
+        jobConf = getJobConf();

Review Comment:
   add synchronized for getJobConf to avoid this.



-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1592438422

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] Jibing-Li commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "Jibing-Li (via GitHub)" <gi...@apache.org>.
Jibing-Li commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1590816733

   I have no more comments, just fix the job conf cache refreshing problem.


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1590609365

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1590647172

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] github-actions[bot] commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1594038553

   PR approved by at least one committer and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1586042576

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1586037734

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1588742734

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] wsjz commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "wsjz (via GitHub)" <gi...@apache.org>.
wsjz commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1594173728

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] morningman merged pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #20591:
URL: https://github.com/apache/doris/pull/20591


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] github-actions[bot] commented on pull request #20591: [fix](multi-catalog)fix s3 check, complete catalog properties

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20591:
URL: https://github.com/apache/doris/pull/20591#issuecomment-1590878152

   PR approved by anyone and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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