Disabling automatic compaction

You can disable automatic compaction of a particular Hive ACID table by setting a Hive table property. By default, compaction is enabled, so you must enter an ALTER TABLE command to disable it.

Compaction of a full ACID table is skipped under the following conditions:
  • Another compaction is either running or already initiated for the target.
  • The compaction target table is already dropped.
  • Table is explicitly configured to be skipped by the auto-compaction
Compaction of an insert-only, ACID table is skipped if hive.compactor.compact.insert.only is set to false (turned off). The default is true. Although you can disable automatic compaction, tables still can be compacted if you explicitly request compaction.Disabling automatic compaction does not prevent you from performing manual compaction.

The compaction auto-initiator can be disabled on service instance level (disabled by default). You can independently enable or disable compaction workers on service instance level. Compaction merges only the bucket files with the same index and keeps the same number of bucket files in base. Compaction does not rebalance the rows between the buckets.

At the Hive JDBC client prompt, in the database of the target table, alter the TBLPROPERTIES.