Details
Description
When trying to submit a job using the Pig editor it fails as soon as the script contains a non ASCII character.
Even just trying to submit a job with a single character like "ö" or "é" fails.
[04/Apr/2014 13:40:22 +0000] middleware INFO Processing exception: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128): Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/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 "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/apps/oozie/src/oozie/views/dashboard.py", line 86, in decorate
return view_func(request, *args, **kwargs)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/apps/pig/src/pig/views.py", line 128, in run
oozie_id = api.get(request.fs, request.jt, request.user).submit(pig_script, params)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/apps/pig/src/pig/api.py", line 67, in submit
workflow = self._create_workflow(pig_script, params)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/apps/pig/src/pig/api.py", line 83, in _create_workflow
self.fs.do_as_user(self.user.username, self.fs.create, script_path, data=pig_script.dict['script'])
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 661, in do_as_user
return fn(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 475, in create
self._invoke_with_redirect('PUT', path, params, data)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 624, in _invoke_with_redirect
return resource.Resource(client).invoke(method, data=data, headers=headers)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/desktop/core/src/desktop/lib/rest/resource.py", line 82, in invoke
headers=headers)
File "/opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p226.12.30/share/hue/desktop/core/src/desktop/lib/rest/http_client.py", line 261, 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 "<string>", line 1, in sendall
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128)