Migrating from H2 to PostgreSQL database in YARN Queue Manager
If you prefer to migrate from an H2 database to a PostgreSQL database in YARN Queue Manager post-installation or upgrade,
all your existing data in the H2 database will be transferred to PostgreSQL.
The YARN Queue Manager will then establish connections and operate using the PostgreSQL database.
This migration supports only one-way transfer from H2 to PostgreSQL. Reverting to H2 after migration
is not supported, and data migration from PostgreSQL back to H2 is not possible.
To continue using the embedded database, upgrade to Cloudera Private Cloud Base
7.1.9 CHF 2 and disregard these instructions. However, if you prefer to use
PostgreSQL as the external database, use Cloudera Private Cloud Base 7.1.9 and follow these
post-installation steps to migrate your database. See Known issues in 7.1.9 CHF 2
linked below for more information.
You must supply the details of a PostgreSQL database to migrate your old data to Cloudera Private Cloud Base 7.1.9 or Cloudera Private Cloud Base 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 Queue Manager 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). This step
is optional if you already have a database and are migrating from H2 to PostgreSQL.
The roles users need to assign are the following:
SUPERUSER CREATEDB
CREATEROLE INHERIT LOGIN.
You can use the following sample query or similar query to
assign roles. You must record these values for use in step
4.
CREATE ROLE qmadmin PASSWORD 'password' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
CREATE DATABASE "configstore";
ALTER DATABASE "configstore" OWNER TO qmadmin;
In your Cloudera Manager instance, navigate to Clusters > Yarn Queue Manager.
Go to the Configuration tab.
In the left navigation menu under Category, click
Database.
Enter the following fields that are required for the PostgreSQL
database.
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
Click Save Changes.
In Queue Manager, navigate to Actions and click
Restart
The data migration to the PostgreSQL database may take a few minutes after Queue Manager is restarted.