5. Configure Hue

Use the following instructions to configure Hadoop for Hue:

  1. Configure the Web Server.

    Edit the following configuration variables under [desktop] section in the /etc/hue/conf/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, Spawning or CherryPy).

      [desktop]
      ...
      # Webserver listens on this address and port
      # Default setting is port 8888 on all configured IP addresses.
      http_host=0.0.0.0
      http_port=8888

    2. Specify the Secret Key. To make your session cookies 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 becomes an administrator automatically. User information is stored in the Django database in the Django backend.

    4. Configure Hue for SSL.

      1. Generate SSL certificate and private key.

      2. Add the following to hue.ini file to configure Hue to use your private key:

        ...
        # Filename of SSL Certificate 
        ssl_certificate=$/path/to/certificate
        ssl_private_key=$/path/to/key 
        [Note]Note

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

  2. Configure Hadoop.

    Edit the following configuration variables under [hadoop] section in the /etc/hue/conf/hue.ini configuration file.

    1. Configure HDFS Cluster. Hue supports only one HDFS cluster currently.

      Ensure that you define the HDFS cluster under the [[[default]]] sub-section.

      Configure the following variables:

      ...
      [hadoop]
      [[hdfs_clusters]] 
      [[[default]]]
      
      # This is equivalent to fs.defaultFS (fs.default.name) in Hadoop configuration. 
      fs_defaultfs=hdfs://localhost:8020
       
      # Use WebHDFS/HttpFS to access HDFS data. 
      # You can also set this to be the HttpFS URL. 
      # The default value is the HTTP port on the NameNode.
      webhdfs_url=
      
      # This is the home of your Hadoop HDFS installation. Defaults to $HADOOP_HDFS_HOME or to /usr/lib/hadoop.
      hadoop_hdfs_home=/usr/lib/hadoop
      
      # This is the HDFS Hadoop launcher script. Defaults to $HADOOP_BIN or /usr/bin/hadoop.
      hadoop_bin=/usr/bin/hadoop
      
      # This is the configuration directory of the HDFS. Defaults to $HADOOP_CONF_DIR or /etc/hadoop/conf. 
      hadoop_conf_dir=/etc/hadoop/conf 
    2. Configure the MapReduce Cluster. Currently, Hue supports only one MapReduce cluster.

      Ensure that you define the HDFS cluster under the [[[default]]] sub-section.

      Configure the following variables:

      ...
      [hadoop]
      [[mapred_clusters]] 
      [[[default]]]
      
      # The host running the JobTracker. 
      # For secure Hadoop cluster, this needs to be the FQDN of the JobTracker host. 
      # The "host" portion must match with the ‘mapred’ Kerberos principal full name.
      jobtracker_host=
      
      # The port for the JobTracker IPC service.
      jobtracker_port=8021
      
      # If Oozie is configured to talk with a MapReduce service, then set this to true. 
      # Hue will be submitting jobs to this MapReduce cluster. 
      submit_to=True
      
      #  Home of your Hadoop MapReduce installation and defaults to either $HADOOP_MR1_HOME or /usr/lib/hadoop-0.20-mapreduce
      hadoop_mapred_home=/usr/lib/hadoop
      
      # MR1 Hadoop launcher script. Defaults to $HADOOP_BIN or /usr/bin/hadoop
      hadoop_bin=/usr/bin/hadoop
      
      # Configuration directory of the MR1 service. Defaults to $HADOOP_CONF_DIR or /etc/hadoop/conf
      hadoop_conf_dir=/etc/hadoop/conf

  3. [Optional] - Configure Beeswax.

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

    ...
    [beeswax]
    
    # Hostname or IP that the Beeswax Server should bind to.
    beeswax_server_host=localhost
    
    # Base directory of your Hive installation
    hive_home_dir=/usr/lib/hive 
    
    # Directory containing your hive-site.xml Hive configuration file.
    hive_conf_dir=/etc/hive/conf 
    
    # Heap size (-Xmx) of the Beeswax Server. 
    beeswax_server_heapsize=
                        
  4. Configure JobDesigner and Oozie.

    In the [liboozie] section of the configuration file, specify the following:

    ...
    [liboozie]
    
    # URL of the Oozie service as specified by the OOZIE_URL environment variable for Oozie.
    oozie_url=
                        
  5. Configure UserAdmin.

    In the [useradmin] section of the configuration file, specify the following:

    ...
    [useradmin]
    
    # Default group suggested when creating a user manually. 
    # If the LdapBackend or PamBackend are configured for user authentication, new users will automatically be members of the default group.
    
    default_user_group=
                        
  6. Validate your configuration.

    For any invalid configurations, Hue displays red alert icon on the top navigation bar:

    To view the configuration of an existing Hue instance, either browse to http://myserver:8888/dump_config or use the About menu.


loading table of contents...