Details
Description
My HBase column names contain some binary data. If I try to view my data in Hue, I see this exception:
Traceback (most recent call last): File "/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/contrib/staticfiles/handlers.py", line 67, in __call__ return self.application(environ, start_response) File "/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/wsgi.py", line 206, in __call__ response = self.get_response(request) File "/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 194, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 229, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/hue/build/env/lib/python2.7/site-packages/django_extensions-1.5.0-py2.7.egg/django_extensions/management/technical_response.py", line 5, in null_technical_500_response six.reraise(exc_type, exc_value, tb) File "/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner return func(*args, **kwargs) File "/hue/apps/hbase/src/hbase/views.py", line 79, in api_router return api_dump(HbaseApi(request.user).query(*url_params)) File "/hue/apps/hbase/src/hbase/views.py", line 128, in api_dump 'limit': trunc_limit, File "/hue/desktop/core/src/desktop/lib/django_util.py", line 476, in __init__ data = json.dumps(data, cls=encoder, indent=indent) File "/usr/lib/python2.7/json/__init__.py", line 250, in dumps sort_keys=sort_keys, **kw).encode(obj) File "/usr/lib/python2.7/json/encoder.py", line 207, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode return _iterencode(o, 0) UnicodeDecodeError: 'utf8' codec can't decode byte 0x91 in position 2: invalid start byte
This is the data that it is trying to encode:
{'limit': 500, 'data': [{'columns': {'d:\x91\x92\xaainstrument\xa3AMP': {'timestamp': 1498029515218, 'value': '\x04'}, 'd:\x91\x92\xaainstrument\xa3CBA': {'timestamp': 1498029515685, 'value': '\x03'}, 'd:\x91\x92\xaainstrument\xa3BHP': {'timestamp': 1498029515456, 'value': '\x07'}}, 'row': 'trade_count\x0020170101'}], 'truncated': True}
HUE-3081 is possibly related?