This is the documentation for Cloudera Enterprise 5.12.x. Documentation for other versions is available at Cloudera Documentation.

Get Started with Hue

Hue is a web-based interactive query editor in the Hadoop stack that lets you visualize and share big data. Try this Easy Install and start exploring Hue.

Figure 1. Hadoop User Experience (Hue)

Easy Install

The simplest way to install CDH and Hue is with Cloudera Manager using the embedded database. Easy Install is for proof-of-concept installations only.

  Note: We install the latest version of CDH on CentOS 7. For more platforms, see Easy Install Variations.
Figure 2. Video: Easy Install of CDH and Hue with Cloudera Manager

Install Cloudera Manager at the Command Line

  1. Prepare a cluster of four or more Linux machines with a supported operating system.
  2. Download a compatible Cloudera Manager package repo (or list) to one host.
  3. Install Oracle JDK, Cloudera Manager server and daemons, and the embedded PostgreSQL database (from the repo).
  4. Start the embedded database and Cloudera Manager server.
    ## Download Cloudera Manager to your package manager source directory.  
    wget https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/cloudera-manager.repo -P /etc/yum.repos.d/
    
    ## Install Cloudera Manager and Dependencies (sourced from the Cloudera Manager repo)
    sudo yum install -y oracle-j2sdk1.7
    sudo yum install -y cloudera-manager-daemons cloudera-manager-server
    sudo yum install -y cloudera-manager-server-db-2
    
    ## Start the database and server
    sudo service cloudera-scm-server-db start
    sudo service cloudera-scm-server start


Install CDH and Hue with Cloudera Manager Installation Wizard

  1. Point a browser to the host with the Cloudera Manager server:
    http:/myhost.example.com:7180
  2. Log on to Cloudera Manager as admin/admin.
  3. Specify hosts with patterns (myhost-[1-n].example.com), or use a legal delimiter.
  4. Run Cluster Installation to install Cloudera Manager agents:
    • Step 1 Use parcels (or packages). Keep the other repository defaults.
    • Step 2 Check both boxes to install JDK 7u67. Do not check if using another supported version.
    • Step 3 Skip Single User Mode if possible.
    • Step 4 Enter SSH login credentials. For tips with ec2, see Install Hue on EC2 in AWS.
    • Step 5 Cloudera Manager agents are installed. If they fail, click Uninstall failed hosts and Retry.
    • Step 6 Parcels are downloaded, distributed, and activated across the cluster.
    • Step 7 Run the Host Inspector to repair issues and click Finish.
        Note: If prompted to disable Transparent Huge Page Compaction, run on each host:
      echo never > /sys/kernel/mm/transparent_hugepage/defrag
      echo never > /sys/kernel/mm/transparent_hugepage/enabled
  5. Run Cluster Setup to install Hue and other CDH services:
    • Step 1 Select services that include Hue, such as Core with Impala. Check Include Cloudera Navigator.
    • Step 2 Add 2 roles for the ZooKeeper Server Zookeeper Server Role (for a total of 3).
    • Step 3 Use default Embedded Database and store password (or see Hue Custom Databases) .
    • Step 4 Review Changes.
    • Step 5 First Run commands deploy all selected services.
    • Step 6 Click Finish.
  6. Go to the Green Status icon Hue Service.

Play with Hue

Analyze and visualize your data with Impala, a high-speed, low-latency SQL query engine.

  Tip: If you don't have your own Hue instance, try running sample queries on http://demo.gethue.com/.
  1. Log on to Hue Hue: select Hue > WebUI.
  2. Download and unzip one year of bike trips from the Bay Area Bike Share program (~80 MB).
  3. Create a table from ~/babs_open_data_year_1/201402_babs_open_data/201402_trip_data.csv.
    • Go to the Metastore Tables Manager.
    • In the default database, click the Create Table icon Hue Create Table icon.
    • Set Type = File.
    • Set Path by dragging 201402_trip_data.csv to the Path field.
    • Set Formats (Comma, New Line, Double Quote) and click Next.
    • Edit Fields and click Submit:
      • Change ZipCode to data type string.
      • Rename Bike # to Bike ID.
    • Click Run Hue Run icon to execute a select query in Hive.
  4. Go to Query Editors > Impala.
    • Click the Refresh icon Hue Refresh icon and select Perform incremental metadata update to display your new table.
    • Input a query into the editor, for example:
      select `start station`, `end station`, count(*) as trips from `default`.`201402_trip_data` group by `start station`, `end station` order by trips desc; 
    • Click the Format icon Hue Format icon to make the query multi-line.
    • Click the Save icon Hue Save icon, input a query name, and click Save.
    • Click the Run icon Hue Run icon to execute the query.
  5. Create a Bar chart by clicking Hue Bar Chart icon:
    • Set the X-axis as start station and the Y-axis as trips. A bar chart displays.
    • Set the Limit to 10.
  6. Create a Pie chart by clicking Hue Pie Chart icon.
  7. Download the results by clicking the Hue Download icon Blue icon and selecting CSV or Excel.

To learn more about the power of Hue, see Hue How-tos.

Page generated August 14, 2017.