Changes to CDH Hive Tables
As a Data Scientist, Architect, Analyst, or other Hive user you need to locate and use your Apache Hive 3 tables after an upgrade. You also need to understand the changes that occur during the upgrade process. The location of existing tables after a CDH to CDP upgrade does not change. Upgrading CDH to CDP Private Cloud Base converts Hive managed tables to external tables in Hive 3.
When the upgrade process converts a managed table to external, it sets the table property
external.table.purge set to true. The table is equivalent to a managed tables
having purge set to true in your old CDH cluster.
Managed tables on the HDFS in /user/hive/warehouse before the upgrade
remain there after the conversion to external. The upgrade process sets the
hive.metastore.warehouse.dir property to this location, designating it the
Hive warehouse location. New tables that you create in CDP are stored in the Hive warehouse you
Tables that were external before the upgrade are not relocated. You need to set HDFS policies to access external tables in Ranger, or set up HDFS ACLs.To change the location of the Hive warehouses, you navigate to one of the following menu items in the first step below.
- Set up directories for the Hive warehouse directory and Hive warehouse external directory from Cloudera Manager Actions.
- In Cloudera Manager, click , and change the hive.metastore.warehouse.dir property value to the path you specified for the new Hive warehouse directory.
- Change the hive.metastore.warehouse.external.dir property value to the path you specified for the Hive warehouse external directory.
- Configure Ranger policies or set up ACL permissions to access the directories.