Installing HDP Manually
Also available as:
PDF
loading table of contents...

Configure Hue

Use the following commands to explore the configuration options for Hue.

  • To list all available configuration options:

    /usr/lib/hue/build/env/bin/hue config_help | less

  • To use multiple files to store your configuration:

    Store all of the files in the /etc/hue/conf directory, with extension .ini. Hue will load and merge them.

Configure Web Server

Use the following instructions to configure Web server:

These configuration variables are under the [desktop] section in the hue.ini configuration file.

  1. Specify the Hue HTTP Address.

    Use the following options to change the IP address and port of the existing Web Server for Hue (by default, CherryPy).

    # Webserver listens on this address and port

    http_host=0.0.0.0

    http_port=8000

    The default setting is port 8000 on all configured IP addresses.

  2. Specify the Secret Key.

    To ensure that your session cookies are secure, enter a series of random characters (30 to 60 characters is recommended) as shown below:

    secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o

  3. Configure authentication.

    By default, the first user who logs in to Hue can choose any username and password and gets the administrator privileges. This user can create other user and administrator accounts. User information is stored in the Django database in the Django backend.

  4. (Optional.) Configure Hue for SSL.

    Install pyOpenSSL in order to configure Hue to serve over HTTPS. To install pyOpenSSL, from the root of your Hue installation path, complete the following instructions:

    • Run the following command on the Hue Server:

      ./build/env/bin/easy_install pyOpenSSL

    • Configure Hue to use your private key. Add the following to hue.ini file:

      ssl_certificate=$PATH_To_CERTIFICATE

      ssl_private_key=$PATH_To_KEY

      ssl_cipher_list = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2" (default).

      [Note]Note

      Ideally, you should have an appropriate key signed by a Certificate Authority. For test purposes, you can create a self-signed key using the openssl command on your system:

      ### Create a keyopenssl genrsa 1024 > host.key

      ### Create a self-signed certificateopenssl req -new -x509 -nodes -sha1 -key host.key > host.cert

      To upload files using the Hue File Browser over HTTPS, you must have a proper SSL Certificate.

Configure Hadoop

Use the following instructions to configure Hadoop.

The following configuration variables are in the [hadoop] section of the hue.ini configuration file.

  1. Configure an HDFS Cluster.

    Hue currently supports only one HDFS cluster. Ensure that you define the HDFS cluster under the [hadoop][[hdfs_clusters]] [[[default]]] subsection. Use the following variables to configure the HDFS cluster:

    Table 14.3. Variables to Configure HDFS Cluster

    Variable

    Description

    Default/Example Value

    fs_defaultfs

    This is equivalent to fs.defaultFS (fs.default.name) in the Hadoop configuration.

    hdfs:// fqdn.namenode.host:8020

    webhdfs_url

    WebHDFS URL.

    The default value is the HTTP port on the NameNode. Example: http://fqdn.namenode.host:50070/webhdfs/v1


  2. Configure a YARN (MR2) Cluster.

    Hue supports only one YARN cluster currently. Ensure that you define the YARN cluster under the [hadoop][[yarn_clusters]] [[[default]]] sub-section. Use the following variables to configure the YARN cluster:

    Table 14.4. Variables to Configure the YARN Cluster

    Variable

    Description

    Default/Example Value

    submit_to

    Set this property to true. Hue will submit jobs to this YARN cluster. Note that JobBrowser will not be able to show MR2 jobs.

    true

    resourcemanager_api_url

    The URL of the ResourceManager API.

    http://fqdn.resourcemanager.host:8088

    proxy_api_url

    The URL of the ProxyServer API.

    http://fqdn.resourcemanager.host:8088

    history_server_api_url

    TThe URL of the HistoryServer API.

    http://fqdn.historyserver.host:19888

    node_manager_api_url

    The URL of the NodeManager API.

    http://fqdn.resourcemanager.host:8042


    [Note]Note

    For more information on how to configure Hue with a NameNode HA cluster, see "Deploy Hue with an HA Cluster."

Configure Beeswax

In the [beeswax] section of the configuration file, you can specify the following values:

Table 14.5. Beeswax Configuration Values

Variable

Description

Default/Example Value

hive_server_host

Host where Hive server Thrift daemon is running. If Kerberos security is enabled, use fully-qualified domain name (FQDN).

hive_server_port

Port where HiveServer2 Thrift server runs on.

10000

hive_conf_dir

Hive configuration directory, where hive-site.xml is located.

/etc/hive/conf

server_conn_timeout

Timeout in seconds for Thrift calls to HiveServer2.

120


[Important]Important

Depending on your environment and the Hive queries you run, queries may fail with an internal error processing query message. Look for an error message java.lang.OutOfMemoryError:

GC overhead limit exceeded in the beeswax_server.out log file. To increase the heap size to avoid this out of memory error, modify the hadoop- env.sh file and change the value of HADOOP_CLIENT_OPTS.

Configure Hue to Communicate with HiveServer2 over SSL (Optional)

(Optional) Use the following changes to hue.ini to configure Hue to communicate with HiveServer2 over SSL:

[[ssl]]
SSL communication enabled for this server.
enabled=false
Path to Certificate Authority certificates.
cacerts=/etc/hue/cacerts.pem
Path to the public certificate file.
cert=/etc/hue/cert.pem
Choose whether Hue should validate certificates received from the server.
validate=true

Configure JobDesigner and Oozie

In the [liboozie] section of the configuration file, specify oozie_url, the URL of the Oozie service as specified by the OOZIE_URL environment variable for Oozie.

Configure hive-site.xml

Modify the hive-site.xml file. On the HiveServer2 host, add the following property to the $HIVE_CONF_DIR/hive-site.xml Where $HIVE_CONF_DIR is the directory for storing Hive configuration files. For example, /etc/hive/conf.

<property>
     <name>hive.server2.enable.impersonation</name>
     <value>true</value>
</property>

Configure WebHCat

In the [hcatalog] section of the hue.ini configuration file, set templeton_url, to the hostname or IP of the WebHCat server. For example: http:// hostname:50111/templeton/v1/.