You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2025/09/02 09:18:10 UTC
(opendal) branch main updated: fix: Do not trim trailing slash of name_node (#6556)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 584650133 fix: Do not trim trailing slash of name_node (#6556)
584650133 is described below
commit 5846501339b2d4874d243aa1aab4c9848218e042
Author: Zhen Wang <64...@qq.com>
AuthorDate: Tue Sep 2 17:18:04 2025 +0800
fix: Do not trim trailing slash of name_node (#6556)
---
core/src/services/hdfs/backend.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/src/services/hdfs/backend.rs b/core/src/services/hdfs/backend.rs
index e549d9850..5221e2b0c 100644
--- a/core/src/services/hdfs/backend.rs
+++ b/core/src/services/hdfs/backend.rs
@@ -75,8 +75,7 @@ impl HdfsBuilder {
/// - `hdfs://127.0.0.1:9000`: connect to hdfs cluster.
pub fn name_node(mut self, name_node: &str) -> Self {
if !name_node.is_empty() {
- // Trim trailing `/` so that we can accept `http://127.0.0.1:9000/`
- self.config.name_node = Some(name_node.trim_end_matches('/').to_string())
+ self.config.name_node = Some(name_node.to_string())
}
self