Modifying the HSMM process

The Hive Strict Managed Migration process (HSMM) runs across all databases to ensure the logic is applied to each database definition. But, you want HSMM to skip processing tables in these databases. To stop this action, you must directly modify the Cloudera Manager Hive Upgrade Process.

You upgraded Cloudera Manager to the version for use by the upgrade.
Perform this procedure if you want to expedite the upgrade process as described in the last topic; otherwise, skip this procedure and manually handle missing table or partition locations and check SERDE definitions.
  1. Open the following file for editing: /opt/cloudera/cm-agent/service/hive/hive.sh
  2. Modify the following Cloudera Manager Agent Script on each agent node (or at least those nodes that have either Hive on Tez or Hive Services) to run only the “db” definition process as shown in the following example:

    FROM

    cmd = format("{hive_script} --config /etc/hive/conf --service  strictmanagedmigration --hiveconf hive.strict.managed.tables=true  -m automatic
    --modifyManagedTables --oldWarehouseRoot /apps/hive/warehouse")

    TO

    cmd = format("{hive_script} --config /etc/hive/conf --service  strictmanagedmigration --hiveconf hive.strict.managed.tables=true  -m automatic
    --modifyManagedTables --oldWarehouseRoot /apps/hive/warehouse --tableRegex zzzzz") 
  3. Restart the Cloudera Manager and agents after this change but before starting the upgrade process.