Configuring the Database Catalog to access the Ozone filesystem

After adding and configuring the Ozone service on the base cluster, creating buckets, and granting Ranger KMS policies to the users, you must configure the Hive MetaStore warehouse directories in the Database Catalog to point to the Ozone filesystem.

By default, the Hive MetaStore (HMS) for Database Catalogs on CDW Private Cloud points to HDFS.
  • If you plan to make Ozone as the default FS, you must configure the Database Catalog to point to the Ozone storage system, as described in this topic.
  • Alternatively, you can create a database with an Ozone bucket as the base directory so that all tables are created in that directory. Following is a sample command:
    CREATE DATABASE ozone_db
    [LOCATION ofs://ozone1/bucket1/ozone_db/external]
    [MANAGEDLOCATION ofs://ozone1/bucket1/ozone_db/managed]
    [WITH DBPROPERTIES (property_name=property_value, ...)];

Before you re-configure the Database Catalog settings, make sure there are no running Virtual Warehouses associated with it. Either the Database Catalog has no associated Virtual Warehouses or you have suspended all the Virtual Warehouses associated with it.

  1. Log in to the Data Warehouse service as a DWAdmin.
  2. Activate an environment in CDW.
  3. Go to the Database Catalog tab, locate your Database Catalog, and click > Edit > CONFIGURATIONS > Metastore and select hive-site from the Configuration files drop-down menu.
  4. Search for the following configuration properties and update them to Ozone filesystem paths, which start with ofs:
    • hive.metastore.warehouse.dir
    • hive.metastore.warehouse.external.dir

    Following is an example of these properties set for a Database Catalog:


    Screenshot of Database Catalog Details page showing metastore properties where you can configure the path for enabling CDW to use the Ozone filesystem.
  5. Click Apply Changes and wait for the Database Catalog to finish applying changes.
After configuring the Database Catalog's Hive metastore to point to Ozone, create a Hive or an Impala Virtual Warehouse, or restart an existing Virtual Warehouse. You can then create databases and table using Hue or other SQL clients with your Virtual Warehouse.