All Products
Search
Document Center

E-MapReduce:Using Hue

Last Updated:Jun 25, 2026

This topic describes how to configure and access Hue on E-MapReduce. You can use Hue to interact with a Hadoop cluster from a browser to analyze and process data.

Prerequisites

  • The access rules for the security group are configured.

    Important

    When you configure security group rules, allow access only from a limited range of IP addresses. Do not allow access from 0.0.0.0/0.

  • Port 8888 is open.

Notes

For Hadoop clusters running on E-MapReduce 3.35.0 or later, or E-MapReduce 4.9.0 or later, note the following:

  • To use Hue Workflow jobs, go to the Hue configuration tab and remove jobbrowser from the value of the app_blacklist parameter. On the Configure tab, enter app_blacklist in the search box to locate the parameter. By default, the value also includes jobbrowser.

  • To browse or manage HDFS directories from the Hue UI, go to the Hue configuration tab, remove filebrowser from the value of the app_blacklist parameter, and start the HttpFS component for the HDFS service. If the HttpFS component is stopped, go to the Deployment Topology page of the HDFS service, find the HttpFS component, and click Start in the Actions column.

View the initial password

By default, the first user who logs on to Hue becomes the administrator if no administrator is configured. For security purposes, E-MapReduce creates an administrator account named admin for the Hue service and sets a random initial password for it. Follow these steps to view the initial password:

  1. Log on to the E-MapReduce console.

  2. In the top navigation bar, select a region and a resource group as needed.

  3. Click the Clusters tab.

  4. On the Clusters page, find the cluster and click Details in the Actions column.

  5. In the left navigation pane, click Services, and then select Hue from the service list.

  6. Click the Configure tab and find the admin_pwd parameter. The value of this parameter is the random password.

    Important

    The admin_pwd parameter specifies only the initial password for the admin account. Changing this parameter in the E-MapReduce console does not update the password in Hue. To change the logon password for the admin account, use the initial password to log on to Hue and change it in the user management module, or reset the account password.

Access Hue

  1. On the Clusters page, find the cluster and click Details in the Actions column.

  2. In the left navigation pane, click Access Links and Ports.

  3. Click the link for the Hue service.

  4. Enter your Hue username and password.

Create a user account

  1. On the Clusters page, find the cluster and click Details in the Actions column.

  2. In the Master Node Group section, obtain the public IP address of the master node.

  3. Log on to the master node. For more information, see Log on to a cluster.

  4. Run the following command to create a new superuser account:

    /opt/apps/hue/build/env/bin/hue createsuperuser
  5. Enter a new username and email address, enter a password, confirm the password, and then press Enter.

    The message Superuser created successfully indicates that the new account is created. You can then log on to Hue with this account.

Reset an account password

  1. Log on to the master node over SSH. For more information, see Log on to a cluster.

  2. Run the following command to view the path to Hue:

    ps aux | grep hue

    The following output is an example.

    [root@emr-header-1 ~]# ps aux | grep hue
    root      3831  1.8  0.4 401888 73696 pts/2    S+   16:25   0:01 /opt/apps/hue/build/env/bin/python2.7 hue/build/env/bin/hue shell
    root      5949  0.0  0.0 112716   960 pts/1    S+   16:26   0:00 grep --color=auto hue
    root      7832  0.0  0.1 369196 19820 ?        Sl   15:13   0:01 /opt/apps/hue/build/env/bin/python2.7 /usr/lib/hue-current/build/env/bin/supervisor
    hue       8019  0.1  0.8 2954004 135800 ?      Sl   15:13   0:06 /opt/apps/hue/build/env/bin/python2.7 /opt/apps/hue/build/env/bin/hue runcherrypyserver
    root     30881  0.3  0.4 401888 73804 pts/0    S+   16:22   0:00 /opt/apps/hue/build/env/bin/python2.7 /opt/apps/hue/build/env/bin/hue shell
    Note

    In this example, the path to Hue is /opt/apps/hue/build/env/bin/hue.

  3. Run the hue shell command using the path obtained in the previous step. For example, /opt/apps/hue/build/env/bin/hue shell. Then, in the interactive shell, enter the following commands to reset the user password:

    from django.contrib.auth.models import User
    user = User.objects.get(username='your username')  # Enter the username whose password you want to reset.
    user.set_password('your new password') # Enter the new password.
    user.save()
    Note

    Press Ctrl+D to exit the shell.

Add configurations

  1. On the Clusters page, find the cluster and click Details in the Actions column.

  2. In the left navigation pane, choose Services > Hue.

  3. Click the Configure tab.

  4. In the Service Configuration section, click hue.

  5. In the upper-right corner, click Custom Configuration to add a key and value.

    $section_path.$real_key

    The following list describes the parameters:

    • $real_key is the actual key that you want to add, such as hive_server_host.

    • $section_path can be obtained from the hue.ini file.

      For example, the hue.ini file shows that hive_server_host belongs to the [beeswax] section. In this case, $section_path is beeswax.

      Note

      Therefore, the key that you add is beeswax.hive_server_host. If you want to modify a value in nested sections of the hue.ini file (for example, user_name_attr under [desktop] -> [[ldap]] -> [[[ldap_servers]]] -> [[[[users]]]]), you must set the key to desktop.ldap.ldap_servers.users.user_name_attr.

Configure YARN queues

When you run interactive SQL queries in Hue, Hue requests computing resources from YARN. To manage and isolate computing resources, you must configure the corresponding queues for HiveSQL and SparkSQL.

  1. On the Clusters page, find the cluster and click Details in the Actions column.

    • For HiveSQL, configure HiveServer2 based on the engine.

      Important

      Replace QUEUENAME with the name of the queue that you want to configure.

      1. In the left navigation pane, choose Services > Hive.

      2. Click the Configure tab.

      3. In the Service Configuration section, click the hiveserver2-site tab.

      4. In the upper-right corner, click Custom Configuration to add the following parameters:

        Engine

        Parameter

        Description

        Hive on MR

        mapreduce.job.queuename

        QUEUENAME

        Hive on Tez

        tez.queue.name

        Hive on Spark

        spark.yarn.queue

        Note

        To modify an existing configuration, you can find the parameter and change its value directly on the Service Configuration page.

    • SparkSQL uses SparkThriftServer. Modify the spark-thriftServer configuration or add a custom configuration in the Spark component:

      1. In the left navigation pane, choose Services > Spark.

      2. Click the Configure tab.

      3. In the Service Configuration section, click the spark-thriftServer tab.

      4. In the upper-right corner, click Custom Configuration, and set the spark.yarn.queue parameter to QUEUENAME.

  2. Restart HiveServer2 and Spark ThriftServer.

    1. On the Clusters page, choose Services > Hive.

    2. In the Components section, find HiveServer2 and click Restart in the Actions column.

      Enter the required information and click OK.

    3. On the Clusters page, choose Services > Spark.

    4. In the Components section, find ThriftServer and click Restart in the Actions column.

      Enter the required information and click OK.