Hue Custom Databases

Hue needs its own database for such things as user account information, job submissions, and SQL queries.

Hue is packaged with a lightweight embedded database (PostgreSQL) for proof-of-concept deployments with one Hue server. Hue also supports connections to a custom external database, local or remote.

Connect Hue to an External Database

Custom Database Concepts

  • There are two ways to connect Hue to an external database:
    • During a new CDH installation with the Cloudera Manager Installation Wizard at Database Setup. The external (or custom) database must be installed, configured, and running.
    • After CDH is installed with Cloudera Manager on the Hue > Configuration tab. You can migrate and connect, or simply connect to the new database without saving the data in the old database.
  • Migrate to a new database only if you want to save data in your current database. Otherwise, simply connect to your new database and restart Hue.
  • An external database can be remote–it does not need to be on the same host as the Hue server. Ensure the database server is properly configured (particularly the bind or listen address).
  • Managed CDH deployments must use Cloudera Manager to configure an external database:

    1. In the Cloudera Manager Admin Console, select Clusters > Hue > Configuration to navigate to the configuration page for Hue.
    2. In the Search text box, type database to locate the database configuration parameters for Hue:

      • Hue Database Type: Select what type of database you want to use.
      • Hue Database Directory: Type the path to the database location.
      • Hue Database Hostname: Type the name of the host where the Hue database is running.
      • Hue Database Port: Type of number of the port on the host where the Hue database is listening.
      • Hue Database Username: Type of name of the user who is used to log on to the Hue database.
      • Hue Database Password: Type the password for the user who is specified in the Hue Database Username property.
      • Hue Database Name: Type the name of the Hue database.
      • Database Dump File: Type the path to the file where the database is dumped to or loaded from.
    3. Click Save Changes at the bottom of the page to save the configuration change.
    4. Refresh the browser page and click the restart icon at the top of the page so the new configuration changes can be read by the server.