Migrating a YARN Queue Manager database to an external database

If you prefer to continue using the embedded database and do not wish to use an external database, install Cloudera Data Platform (CDP) 7.1.9 CHF 2 and disregard these instructions. See Known issues in 7.1.9 CHF 2 linked below for more information. If you want to use an external database, use PostgreSQL database, install CDP 7.1.9 or CDP 7.1.9 CHF 1, and continue with these post-installation steps to migrate your database. This migration is needed because Queue Manager uses a different database as its backing store in CDP 7.1.9 and CDP 7.1.9 CHF 2 than what was used in previous versions of CDP 7.1.8 and below. Once you have configured the database as detailed in the steps below, the data migration process is automatic.

You must supply the details of a PostgreSQL database to migrate your old data to CDP 7.1.9 or CPD 7.1.9 CHF 1 as the only external database that Queue Manager supports in these versions is PostgreSQL. When updating to versions after 7.1.9 CHF 2, YARN QM will continue to use PostgreSQL if it was initially configured.
You must first create a database for Queue Manager and then configure the database to assign roles and permissions for the user (dbuser). The roles users need to assign are the following: SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN. You can use the sample query or a similar query below:
CREATE ROLE qmadmin PASSWORD 'password' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
CREATE DATABASE "configstore";
ALTER DATABASE "configstore" OWNER TO qmadmin;
  1. In your Cloudera Manager instance, navigate to Clusters > Yarn Queue Manager.
  2. Click the Configuration tab.
  3. In the left navigation menu under Category, click Database.
  4. Enter the following fields that are required for the PostgreSQL database that is to be used. You will have these values from the query that was run in the prerequisite:
    • QueueManager Config Service Database Name
    • QueueManager Config Service Database Host
    • QueueManager Config Service Database Port
    • QueueManager Config Service Database User
    • QueueManager Config Service Database User Password
  5. Click Save Changes.
  6. In Queue Manager, navigate to Actions and click Restart. The data migration to the PostgreSQLdata database may take a few minutes after Queue Manager is restarted.