Skip to main content
asish
Gold ⭐️⭐️⭐️
Gold ⭐️⭐️⭐️
Jul 18, 2021 3:32 PM UTC

Criteria for upgrading Hive managed table from HDP to CDP

  • Oct 5, 2026 8:50 AM UTC
  • 0 replies
  • 568 views
  • Translate All

Following is the criteria:

  • ORC and Managed table
  • ACID enabled
  • HDFS directory should be owned by Hive

According to the shouldTableBeExternal method in HiveStrictMigration.java, a table is external if it is a StorageHandler table, or if it is an Avro/Text/Parquet table, or if it is a list bucketed table, or the directory is not owned by Hive. 

 

Following is the codebase that describes the same:

String reason = shouldTableBeExternal(tableObj, ownerName, conf, hms, isPathOwnedByHive); if (reason != null) { LOG.debug("Converting {} to external table. {}", getQualifiedName(tableObj), reason); result = TableMigrationOption.EXTERNAL; } else { result = TableMigrationOption.MANAGED;

Reference: HiveStrictManagedMigration (GitHub)

It should be converted to an EXTERNAL table, in case it does not fit the criteria for the upgrade.