wuzhiguo created BIGTOP-3752:
--------------------------------
Summary: Ambari query webhdfs failed with Zeppelin notebook
Key: BIGTOP-3752
URL: https://issues.apache.org/jira/browse/BIGTOP-3752
Project: Bigtop
Issue Type: Bug
Reporter: wuzhiguo
webhdfs request cannot contains SPACE in path, but Zeppelin notebook contains
SPACE character, it'll cause 400 bad request
Traceback (most recent call last):
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 287, in _run_command
result_dict = json.loads(out)
File "/usr/lib/ambari-agent/lib/ambari_simplejson/__init__.py", line 307, in
loads
return _default_decoder.decode(s)
File "/usr/lib/ambari-agent/lib/ambari_simplejson/decoder.py", line 335, in
decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/ambari-agent/lib/ambari_simplejson/decoder.py", line 353, in
raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
The above exception was the cause of the following exception:
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/ZEPPELIN/package/scripts/master.py",
line 677, in <module>
Master().execute()
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py",
line 352, in execute
method(env)
File
"/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/ZEPPELIN/package/scripts/master.py",
line 239, in start
self.check_and_copy_notebook_in_hdfs(params)
File
"/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/ZEPPELIN/package/scripts/master.py",
line 213, in check_and_copy_notebook_in_hdfs
recursive_chmod=True
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166,
in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py",
line 160, in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py",
line 124, in run_action
provider_action()
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 677, in action_create_on_execute
self.action_delayed("create")
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 674, in action_delayed
self.get_hdfs_resource_executor().action_delayed(action_name, self)
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 373, in action_delayed
self.action_delayed_for_nameservice(None, action_name, main_resource)
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 403, in action_delayed_for_nameservice
self._create_resource()
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 422, in _create_resource
self._copy_from_local_directory(self.main_resource.resource.target,
self.main_resource.resource.source)
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 430, in _copy_from_local_directory
self._create_directory(new_target)
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 494, in _create_directory
self.util.run_command(target, 'MKDIRS', method='PUT')
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 214, in run_command
return self._run_command(*args, **kwargs)
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py",
line 295, in _run_command
raise WebHDFSCallException(err_msg, result_dict)
resource_management.libraries.providers.hdfs_resource.WebHDFSCallException:
Execution of 'curl -sS -L -w '%\{http_code}' -X PUT -d '' -H 'Content-Length:
0'
'http://ambari-agent-01:50070/webhdfs/v1/var/lib/zeppelin/notebook/Miscellaneous
Tutorial?op=MKDIRS&user.name=hdfs'' returned status_code=400.
<h1>Bad Message 400</h1><pre>reason: Illegal character SPACE=' '</pre>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)