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

Hue cannot handle column containing non-UTF8 data

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 4.0.0
    • Fix Version/s: None
    • Component/s: con.hbase
    • Labels:
    • Environment:

      Using the official Hue Docker image

      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?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              acordiner Alister C
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: