I created a table in hive to test compaction,
CREATE TABLE part_test(id int, name string, city string) PARTITIONED BY (dept string) clustered by (city) into 5 buckets stored as orc TBLPROPERTIES('transactional'='true');
In the screenshot we can see that there are many delta directories created(around 12 files).
The compaction is automatically initiated but it is not running or working to compact the delta directories.The following are the properties we set in hive.
set hive.compactor.initiator.on=true;
set hive.compactor.worker.threads=1;
set hive.compactor.delta.pct.threshold=0.1f;
set hive.compactor.delta.num.threshold=10;
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.enforce.bucketing=true;
In the screenshot 2 we can see the compaction status as initiated but not executed for more than a day. How does we make the compaction to work ? do we need any other properties to set ?