This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 0a6803ebecc [fix](tvf) Support fs.defaultFS with postfix '/' #33202
(#33221)
0a6803ebecc is described below
commit 0a6803ebecc13f9920855cdfb390feb225d56483
Author: Mingyu Chen <[email protected]>
AuthorDate: Wed Apr 3 17:36:02 2024 +0800
[fix](tvf) Support fs.defaultFS with postfix '/' #33202 (#33221)
bp #33202
---
be/src/util/hdfs_util.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/be/src/util/hdfs_util.cpp b/be/src/util/hdfs_util.cpp
index f82b51cb272..6e99fdea3d3 100644
--- a/be/src/util/hdfs_util.cpp
+++ b/be/src/util/hdfs_util.cpp
@@ -45,6 +45,11 @@ Path convert_path(const Path& path, const std::string&
namenode) {
Path real_path(path);
if (path.string().find(namenode) != std::string::npos) {
std::string real_path_str = path.string().substr(namenode.size());
+ if (!real_path_str.starts_with("/")) {
+ // The real path must starts with "/"
+ // Or the hadoop client will add a prefix like "/user/hadoop".
+ real_path_str = "/" + real_path_str;
+ }
real_path = real_path_str;
}
return real_path;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]