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 to true. The table is equivalent to a managed table
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. 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.
process sets the
hive.metastore.warehouse.dir property to
/warehouse/tablespace/managed/hive, designating it the Hive warehouse location
for managed tables. New managed tables that you create in CDP are stored in the Hive warehouse.
New external tables are stored in the Hive external warehouse
- 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.