wsjz commented on code in PR #34518:
URL: https://github.com/apache/doris/pull/34518#discussion_r1593916735


##########
be/src/io/file_factory.cpp:
##########
@@ -94,6 +94,16 @@ Status FileFactory::create_file_writer(TFileType::type type, 
ExecEnv* env,
     case TFileType::FILE_HDFS: {
         THdfsParams hdfs_params = parse_properties(properties);
         std::shared_ptr<io::HdfsFileSystem> fs;
+        // If the destination path contains a schema, use the schema directly.
+        // If not, use defaultFS.
+        // Otherwise a write error will occur.
+        string::size_type idx = path.find("://");
+        if (idx != string::npos) {
+            idx = path.find("/", idx + 3);
+            if (idx != string::npos) {
+                hdfs_params.fs_name = path.substr(0, idx);

Review Comment:
   give a comment to show that parse fs_name from hdfs://host:port and 
hdfs://dfsnameservice



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