Migrating Hue databases from CDH to CDP
You must migrate Hue data from the CDH cluster to CDP.
On your CDH environment enabled with Hue cluster migrate the Hue database:
- In the Hue Web UI, click the home icon to view the documents that you plan to migrate.
In Cloudera Manager, stop the Hue service. Go to Hue and
select Actions > Stop.
From Cloudera Manager -> Hue
-> Select Actions > Dump
Database and click Dump Database.
This exports a JSON file that is database-agnostic. The file is written to
on the host running the Hue service.
- Log on to the host of the Hue server in a command-line terminal. You can find the hostname on the Dump Database window and at Hue > Hosts.
Remove the following lines from the
hue_database_dump.jsonfile.ALERT: This appears to be a CM Managed environment
ALERT: HUE_CONF_DIR must be set when running hue commands in CM Managed environment
ALERT: Please run 'hue <command> --cm-managed'On your CDP environment:
- In Cloudera Manager for the CDP environment that is, DataHub Cloudera Manager (not Data Lake Cloudera Manager), set up the database for Hue.
- Synchronize: Select Actions > Synchronize Database and click Synchronize Database.
- Truncate all the records in the Hue tables available under the Hue database.
Additionally, on the CDP environment: As no information is stored in the Hue database yet:
- Copy the
hue_database_dump.jsonfrom the CDH cluster to the CDP cluster.
- Place the JSON file taken out from the legacy CDH Hue Cluster and place
/tmpon the new CDP Hue server host.
- Stop the Hue Service.
- Run the following commands:
./build/env/bin/hue loaddata --ignorenonexistent /tmp/<HUE_DATABASE_JSON_FILE> --cm-managed
- Start the Hue service.
- From Cloudera Manager -> Hue -> Select Actions -> Synchronize: Select Actions > Synchronize Database and click Synchronize Database.
- Start the Hue Service.