This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 76dc9fbe7b AMBARI-25739: Encode space when creating directory via
webhdfs (#3372)
76dc9fbe7b is described below
commit 76dc9fbe7b8be03824fe2afd277bf6fa1f543a53
Author: Zhiguo Wu <[email protected]>
AuthorDate: Wed Oct 12 14:03:45 2022 +0800
AMBARI-25739: Encode space when creating directory via webhdfs (#3372)
---
.../python/resource_management/libraries/providers/hdfs_resource.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
index 9db0ebf885..0efb143754 100644
---
a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
+++
b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
@@ -674,7 +674,7 @@ class HdfsResourceProvider(Provider):
else:
path = path
- return re.sub("[/]+", "/", path)
+ return re.sub("[/]+", "/", path).replace(" ", "%20")
@staticmethod
def get_ignored_resources_list(hdfs_resource_ignore_file):
@@ -687,7 +687,7 @@ class HdfsResourceProvider(Provider):
hdfs_resources_to_ignore = []
for hdfs_resource_to_ignore in content.split("\n"):
hdfs_resources_to_ignore.append(HdfsResourceProvider.parse_path(hdfs_resource_to_ignore))
-
+
return hdfs_resources_to_ignore
def action_delayed(self, action_name):
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]