Details
Description
https://groups.google.com/a/cloudera.org/forum/#!topic/hue-user/Z4Z3cxQ5PkI
Env: Hue 4.0. I commit a shell action in query editor. When a select a script like below image, and run . It export report Error: " unsupported operand type(s) for +: 'dict' and 'str' " Job was kiled cause the file is not setting in oozie: ``` <workflow-app name="Batch job for query-shell" xmlns="uri:oozie:workflow:0.5"> <start to="shell-109b"/> <kill name="Kill"> <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill> <action name="shell-109b"> <shell xmlns="uri:oozie:shell-action:0.1"> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <exec>/user/zpdn1691/test_env.sh</exec> <capture-output/> </shell> <ok to="End"/> <error to="Kill"/> </action> <end name="End"/> </workflow-app> ``` I found a similar issue, but I said the issues was resolved in hue 2.0. https://issues.cloudera.org/browse/HUE-1032 logs: Traceback (most recent call last): File "/home/hadoop/hue/4.0/test/hue/desktop/libs/notebook/src/notebook/decorators.py", line 82, in decorator return func(*args, **kwargs) File "/home/hadoop/hue/4.0/test/hue/desktop/libs/notebook/src/notebook/api.py", line 164, in execute response = _execute_notebook(request, notebook, snippet) File "/home/hadoop/hue/4.0/test/hue/desktop/libs/notebook/src/notebook/api.py", line 115, in _execute_notebook response['handle'] = get_api(request, snippet).execute(notebook, snippet) File "/home/hadoop/hue/4.0/test/hue/desktop/libs/notebook/src/notebook/connectors/oozie_batch.py", line 78, in execute job_id = _submit_workflow(user=self.user, fs=self.fs, jt=self.jt, workflow=workflow, mapping=None) File "/home/hadoop/hue/4.0/test/hue/apps/oozie/src/oozie/views/editor2.py", line 441, in _submit_workflow job_id = submission.run() File "/home/hadoop/hue/4.0/test/hue/desktop/libs/liboozie/src/liboozie/submission2.py", line 52, in decorate deployment_dir = self.deploy() File "/home/hadoop/hue/4.0/test/hue/desktop/libs/liboozie/src/liboozie/submission2.py", line 290, in deploy oozie_xml = self.job.to_xml(self.properties) File "/home/hadoop/hue/4.0/test/hue/apps/oozie/src/oozie/models2.py", line 459, in to_xml 'workflow_mapping': workflow_mapping File "/home/hadoop/hue/4.0/test/hue/desktop/core/src/desktop/lib/django_mako.py", line 114, in render_to_string_normal result = template.render(**data_dict) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py", line 443, in render return runtime._render(self, self.callable_, args, data) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 786, in _render **_kwargs_for_callable(callable_, data)) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 818, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 844, in _exec_template callable_(context, *args, **kwargs) File "/tmp/tmpP_7Hii/oozie/editor2/gen/workflow.xml.mako.py", line 110, in render_body __M_writer( node.to_xml(mapping, node_mapping, workflow_mapping) ) File "/home/hadoop/hue/4.0/test/hue/apps/oozie/src/oozie/models2.py", line 916, in to_xml return django_mako.render_to_string(self.get_template_name(), data) File "/home/hadoop/hue/4.0/test/hue/desktop/core/src/desktop/lib/django_mako.py", line 114, in render_to_string_normal result = template.render(**data_dict) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py", line 443, in render return runtime._render(self, self.callable_, args, data) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 786, in _render **_kwargs_for_callable(callable_, data)) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 818, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/home/hadoop/hue/4.0/test/hue/build/env/local/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 844, in _exec_template callable_(context, *args, **kwargs) File "/tmp/tmpP_7Hii/oozie/editor2/gen/workflow-shell-document.xml.mako.py", line 88, in render_body __M_writer(escape(unicode( common.distributed_cache(node['properties']['files'], node['properties']['archives']) ))) File "/tmp/tmpP_7Hii/oozie/editor2/gen/workflow-common.xml.mako.py", line 111, in render_distributed_cache __M_writer(escape(unicode( filelink(f['value']) ))) File "/tmp/tmpP_7Hii/oozie/editor2/gen/workflow-common.xml.mako.py", line 92, in filelink return render_filelink(context,path) File "/tmp/tmpP_7Hii/oozie/editor2/gen/workflow-common.xml.mako.py", line 82, in render_filelink __M_writer(escape(unicode( '#' in path and path or path + '#' + posixpath.basename(path) ))) TypeError: unsupported operand type(s) for +: 'dict' and 'str'
Attachments
Issue Links
- relates to
-
HUE-7677 [editor] Shell job should automatically add the selected script as a file
-
- Closed
-