Implementation:Apache Druid Compaction Dynamic Config Completions
| Knowledge Sources | |
|---|---|
| Domains | Web_Console, Compaction |
| Last Updated | 2026-02-10 10:00 GMT |
Overview
Defines JSON autocompletion rules for the cluster-wide compaction dynamic configuration editor in the Druid web console.
Description
COMPACTION_DYNAMIC_CONFIG_COMPLETIONS is a constant array of JsonCompletionRule objects that provides context-aware autocompletion for editing the global compaction dynamic configuration. The rules cover root-level properties including compactionTaskSlotRatio, maxCompactionTaskSlots, compactionPolicy, useSupervisors, engine, and storeCompactionStatePerSegment. Conditional completions are provided for the engine property based on whether useSupervisors is enabled (allowing the MSQ engine option) or not (restricting to native only).
Usage
This module is consumed by the CompactionDynamicConfigDialog component, which passes the completions array to the JsonInput component when editing the cluster-wide compaction configuration in JSON mode.
Code Reference
Source Location
- Repository: Apache Druid
- File: web-console/src/dialogs/compaction-dynamic-config-dialog/compaction-dynamic-config-completions.ts
- Lines: 1-138
Signature
export const COMPACTION_DYNAMIC_CONFIG_COMPLETIONS: JsonCompletionRule[]
Import
import { COMPACTION_DYNAMIC_CONFIG_COMPLETIONS } from './compaction-dynamic-config-completions';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | N/A | N/A | This is a constant data definition with no runtime inputs |
Outputs
| Name | Type | Description |
|---|---|---|
| COMPACTION_DYNAMIC_CONFIG_COMPLETIONS | JsonCompletionRule[] |
Array of completion rules covering root-level properties (compactionTaskSlotRatio, maxCompactionTaskSlots, compactionPolicy, useSupervisors, engine, storeCompactionStatePerSegment), suggested numeric values for slot ratios and limits, compactionPolicy type (newestSegmentFirst), and conditional engine options based on useSupervisors state |
Usage Examples
Providing completions to the compaction dynamic config JSON editor
import { COMPACTION_DYNAMIC_CONFIG_COMPLETIONS } from './compaction-dynamic-config-completions';
<JsonInput
value={dynamicConfig}
height="50vh"
onChange={setDynamicConfig}
setError={setJsonError}
jsonCompletions={COMPACTION_DYNAMIC_CONFIG_COMPLETIONS}
/>