Starting compaction manually
You manually start compaction when automatic compaction fails for some reason. You can start compaction by running a Hive statement.
Start compaction using a query
You use the following syntax to issue a query that starts compaction:ALTER TABLE tablename [PARTITION (partition_key='partition_value' [,...])] COMPACT 'compaction_type'
- Tables or partitions you are compacting must be full ACID or insert-only ACID tables.
- Compaction must be enabled (initiator hive.compactor.initiator.on=true)