You can also use compaction supervisors (experimental) instead of Coordinator-based compaction.
Manage automatic compaction
Create or update compaction configuration
Creates or updates automatic compaction configuration for a datasource. Only thedataSource property is required; Druid fills other properties with default values.
Name of the datasource to configure compaction for.
ISO-8601 duration. Skip segments within this time from the latest segment.
Tuning configuration for compaction tasks including partitioning strategy.
Granularity specification including
segmentGranularity for compacted segments.Remove compaction configuration
Removes automatic compaction configuration for a datasource.Name of the datasource.
View compaction configuration
Get all compaction configurations
Retrieves all automatic compaction configurations and cluster-level settings.Array of compaction configurations for all datasources.
Ratio of task slots allocated to compaction tasks (default: 0.1).
Maximum number of task slots for compaction (default: 2147483647).
Get compaction configuration for a datasource
Retrieves the automatic compaction configuration for a specific datasource.Name of the datasource.
Get compaction configuration history
Retrieves the history of compaction configuration changes for a datasource.Name of the datasource.
ISO-8601 interval to filter results (e.g.,
2023-01-01/2023-12-31).Limit the number of history entries returned.
Cluster-level compaction configuration at the time of change.
Datasource compaction configuration.
Information about who made the change.
ISO-8601 timestamp of the change.
View compaction status
Get segments awaiting compaction
Returns the total size of segments awaiting compaction for a datasource.Name of the datasource.
Get compaction status and statistics
Retrieves status and statistics from the latest automatic compaction run for all datasources.Filter results by datasource name.
Array of status objects for each datasource.
Name of the datasource.
Compaction scheduling status: NOT_ENABLED or RUNNING.
Total bytes waiting to be compacted.
Total bytes already compacted.
Total bytes skipped (not eligible for compaction).
Number of segments waiting to be compacted.