Uploaded image for project: 'Hue'
  1. Hue
  2. HUE-1031

[oozie] Encode generated XML in UTF-8

    Details

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

      Description

      In a Sqoop action, Outlook had converted – to — for one of the sqoop flags (password) and caused the submit of the workflow to hang. We probably need to send UTF-8.

      [01/Feb/2013 15:47:40 +0000] middleware INFO Processing exception: 'ascii' codec can't encode character u'\u2014' in position 776: ordinal not in range(128): 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/views/editor.py", line 75, in decorate
      return view_func(request, *args, **kwargs)
      File "/usr/share/hue/apps/oozie/src/oozie/views/editor.py", line 316, in submit_workflow
      job_id = _submit_workflow(request, workflow, mapping)
      File "/usr/share/hue/apps/oozie/src/oozie/views/editor.py", line 337, in _submit_workflow
      job_id = submission.run()
      File "/usr/share/hue/desktop/libs/liboozie/src/liboozie/submittion.py", line 64, in run
      deployment_dir = self.deploy()
      File "/usr/share/hue/desktop/libs/liboozie/src/liboozie/submittion.py", line 89, in deploy
      self._do_as(self.user.username , self._copy_files, deployment_dir, oozie_xml)
      File "/usr/share/hue/desktop/libs/liboozie/src/liboozie/submittion.py", line 171, in _do_as
      return fn(*args, **kwargs)
      File "/usr/share/hue/desktop/libs/liboozie/src/liboozie/submittion.py", line 145, in _copy_files
      self.fs.create(xml_path, overwrite=True, permission=0644, data=oozie_xml)
      File "/usr/share/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 377, in create
      self._invoke_with_redirect('PUT', path, params, data)
      File "/usr/share/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 492, in _invoke_with_redirect
      return resource.Resource(client).invoke(method, data=data, headers=headers)
      File "/usr/share/hue/desktop/core/src/desktop/lib/rest/resource.py", line 58, in invoke
      headers=headers)
      File "/usr/share/hue/desktop/core/src/desktop/lib/rest/http_client.py", line 173, in execute
      return self._opener.open(request)
      File "/usr/lib64/python2.6/urllib2.py", line 391, in open
      response = self._open(req, data)
      File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
      '_open', req)
      File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
      result = func(*args)
      File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
      return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib64/python2.6/urllib2.py", line 1162, in do_open
      h.request(req.get_method(), req.get_selector(), req.data, headers)
      File "/usr/lib64/python2.6/httplib.py", line 914, in request
      self._send_request(method, url, body, headers)
      File "/usr/lib64/python2.6/httplib.py", line 954, in _send_request
      self.send(body)
      File "/usr/lib64/python2.6/httplib.py", line 759, in send
      self.sock.sendall(str)
      File "/usr/share/hue/build/env/lib/python2.6/site-packages/eventlet-0.9.14-py2.6.egg/eventlet/greenio.py", line 283, in sendall
      tail = self.send(data, flags)
      File "/usr/share/hue/build/env/lib/python2.6/site-packages/eventlet-0.9.14-py2.6.egg/eventlet/greenio.py", line 269, in send
      total_sent += fd.send(data[total_sent:], flags)
      UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in position 776: ordinal not in range(128)

        Attachments

          Activity

            People

            • Assignee:
              abe Abraham Elmahrek
              Reporter:
              romain Romain Rigaux
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: