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

[core] Fails to start if Hive/Impala Not Installed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.9.0
    • Fix Version/s: 3.11.0
    • Component/s: core.api
    • Labels:
      None
    • Target Version:
    • Sprint:
      Jul 5-22, 2016, Jul 25 - Aug 12, 2016

      Description

      I am not sure if this is a problem with Hue or a problem with my understanding of how modular it is, but I have discovered a problem in Hue 3.9.0 (CDH 5.8.0) that did not occur in previous versions.

      The background is that I have a need to create virtual machines with only certain components (e.g., for training and demonstrations), because it's important that these virtual machines are as small and efficient as possible. For example, I might have one VM with only YARN + Spark, another with YARN + Hive + Impala, and another with YARN + Solr + Flume + HBase. I therefore install only the relevant packages in CDH (via RPMs), and instead of installing the "hue" metapackage, I install specific packages such as "hue-common" and "hue-search" to get what I need. This has worked fine in the past, but fails when I upgraded the YARN + Solr + Flume + HBase from CDH 5.1.3 to CDH 5.8.0, as I'll detail below. I should add that earlier in the week, I upgraded the YARN + Hive + Impala VM from CDH 5.2.0 to CDH 5.8.0 and did not have a problem, so I think the important difference is that the VM I'm using today lacks Hive and Impala.

      When I launch the Web browser and try to access Hue on this new VM, I see an exception, the last few lines of which are:

      File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django
      /utils/importlib.py", line 40, in import_module
      __import__(name)
      File "/usr/lib/hue/desktop/core/src/desktop/configuration/api.py", line 32, in <module>
      from notebook.connectors.hiveserver2 import HiveConfiguration, ImpalaConfiguration
      File "/usr/lib/hue/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line
      80, in <module>
      class HiveConfiguration(object):
      File "/usr/lib/hue/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line
      109, in HiveConfiguration
      "options": [config.lower() for config in hive_settings.get()] if
      hasattr(hive_settings, 'get') else []
      NameError: name 'hive_settings' is not defined
      

      If I comment out line 32 in /usr/lib/hue/desktop/core/src/desktop/configuration/api.py (which says "from notebook.connectors.hiveserver2 import HiveConfiguration, ImpalaConfiguration") and restart Hue, the error goes away and Hue appears to work normally.

      Maybe this import should be done conditionally, or at least failure handled more gracefully, in the case that the user does have Hive or Impala installed.

        Attachments

          Activity

            People

            • Assignee:
              jennykim Jenny Kim
              Reporter:
              twheeler@cloudera.com Tom Wheeler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: