Initiating automatic compaction in Cloudera Manager
Several properties in the Hive and Hive metastore service configurations must be set to enable automatic compaction. You need to check that the property settings are correct and to add one of the properties to the Hive on Tez service. Automatic compaction will then occur at regular intervals, but only if necessary.
hive.compactor.initiator.on
on the Hive metastore instance level.
For more information, see Hive Metastore leader election.Disable Initiator threads in all the Datahub clusters' Hive service, the compaction initiator thread can be run by the leader HMS in the DataLake cluster. Set the following properties:
- In Hive metastore (Hive-1) service:
hive.compactor.initiator.on = true
(default)
- In Hive on Tez service:
hive.compactor.worker.threads =
<a value greater than 0> (default and recommended value = 5)hive.metastore.runworker.in = hs2
(default)