platoneko commented on code in PR #32681:
URL: https://github.com/apache/doris/pull/32681#discussion_r1535283875


##########
be/src/cloud/cloud_meta_mgr.cpp:
##########
@@ -826,18 +826,7 @@ Status CloudMetaMgr::get_storage_vault_info(
                                   });
     }
     for (const auto& vault : resp.storage_vault()) {
-        THdfsParams params;
-        params.fs_name = vault.hdfs_info().build_conf().fs_name();
-        params.user = vault.hdfs_info().build_conf().user();
-        params.hdfs_kerberos_keytab = 
vault.hdfs_info().build_conf().hdfs_kerberos_keytab();
-        params.hdfs_kerberos_principal = 
vault.hdfs_info().build_conf().hdfs_kerberos_principal();
-        for (const auto& confs : vault.hdfs_info().build_conf().hdfs_confs()) {
-            THdfsConf conf;
-            conf.key = confs.key();
-            conf.value = confs.value();
-            params.hdfs_conf.emplace_back(std::move(conf));
-        }
-        vault_infos->emplace_back(vault.id(), std::move(params));
+        vault_infos->emplace_back(vault.id(), std::move(vault.hdfs_info()));

Review Comment:
   
   ```suggestion
           if (vault.has_hdfs_info()) {
               vault_infos->emplace_back(vault.id(), vault.hdfs_info());
           }
   ```
   std::move has no effect on const



##########
be/src/util/vault_info_util.cpp:
##########


Review Comment:
   Consider to move these code to `io/hdfs_util.cpp`



##########
be/src/cloud/cloud_meta_mgr.h:
##########
@@ -71,7 +71,7 @@ class CloudMetaMgr {
     Status precommit_txn(const StreamLoadContext& ctx);
 
     Status get_storage_vault_info(

Review Comment:
   
   ```suggestion
       using StorageVaultInfos = std::vector<...>;
       Result<StorageVaultInfos> get_storage_vault_info()
   ```



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