Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-1034

[oozie] Streaming action should not have a job_xml

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: con.oozie
    • Labels:
    • Environment:

      Description

      AttributeError: 'Streaming' object has no attribute 'job_xml'

      But there is no "Job xml" field in the Streaming action's form.

      My temporary fix: remove the following lines in https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/templates/editor/gen/workflow-streaming.xml.mako

                  % if node.job_xml:
                    <job-xml>${ node.job_xml }</job-xml>
                  % endif
      

      The full stack trace:

      [07/Feb/2013 11:31:15 +0000] middleware   INFO     Processing exception: 'Streaming' object has no attribute 'job_xml': Traceback (most recent call last):
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
          response = callback(request, *callback_args, **callback_kwargs)
        File "/usr/share/hue/apps/oozie/src/oozie/decorators.py", line 66, in decorate
          return view_func(request, *args, **kwargs)
        File "/usr/share/hue/apps/oozie/src/oozie/views/editor.py", line 205, in submit_workflow
          job_id = _submit_workflow(request, workflow, mapping)
        File "/usr/share/hue/apps/oozie/src/oozie/views/editor.py", line 226, in _submit_workflow
          job_id = submission.run()
        File "/usr/share/hue/desktop/libs/liboozie/src/liboozie/submittion.py", line 73, in run
          deployment_dir = self.deploy()
        File "/usr/share/hue/desktop/libs/liboozie/src/liboozie/submittion.py", line 121, in deploy
          oozie_xml = self.job.to_xml(self.properties)
        File "/usr/share/hue/apps/oozie/src/oozie/models.py", line 442, in to_xml
          return re.sub(re.compile('\s*\n+', re.MULTILINE), '\n', django_mako.render_to_string(tmpl, {'workflow': self, 'mapping': mapping}))
        File "/usr/share/hue/desktop/core/src/desktop/lib/django_mako.py", line 105, in render_to_string_normal
          result = template.render(**data_dict)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/template.py", line 412, in render
          return runtime._render(self, self.callable_, args, data)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 766, in _render
          **_kwargs_for_callable(callable_, data))
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 798, in _render_context
          _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 824, in _exec_template
          callable_(context, *args, **kwargs)
        File "/tmp/tmpai4Tfh/oozie/editor/gen/workflow.xml.mako.py", line 67, in render_body
          __M_writer( node.to_xml(mapping) )
        File "/usr/share/hue/apps/oozie/src/oozie/models.py", line 548, in to_xml
          return django_mako.render_to_string(node.get_template_name(), data)
        File "/usr/share/hue/desktop/core/src/desktop/lib/django_mako.py", line 105, in render_to_string_normal
          result = template.render(**data_dict)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/template.py", line 412, in render
          return runtime._render(self, self.callable_, args, data)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 766, in _render
          **_kwargs_for_callable(callable_, data))
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 798, in _render_context
          _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
        File "/usr/share/hue/build/env/lib/python2.6/site-packages/Mako-0.7.2-py2.6.egg/mako/runtime.py", line 824, in _exec_template
          callable_(context, *args, **kwargs)
        File "/tmp/tmpai4Tfh/oozie/editor/gen/workflow-streaming.xml.mako.py", line 58, in render_body
          if node.job_xml:
      AttributeError: 'Streaming' object has no attribute 'job_xml'
      

        Attachments

          Activity

            People

            • Assignee:
              romain Romain Rigaux
              Reporter:
              nfo Nicolas Fouché
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: