Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Apache Druid Compaction Config Completions

From Leeroopedia


Knowledge Sources
Domains Web_Console, Compaction
Last Updated 2026-02-10 10:00 GMT

Overview

Defines JSON autocompletion rules for the compaction configuration editor in the Druid web console.

Description

COMPACTION_CONFIG_COMPLETIONS is a constant array of JsonCompletionRule objects that powers intelligent autocompletion within the JSON editor used for editing compaction configurations. The rules are organized hierarchically by JSON path, providing context-aware suggestions for properties such as dataSource, skipOffsetFromLatest, taskPriority, tuningConfig, ioConfig, dimensionsSpec, granularitySpec, and their nested sub-properties. Conditional completions are provided for partitioning types (dynamic, hashed, range, single_dim) so that only relevant properties are suggested based on the current type value.

Usage

This module is consumed by the CompactionConfigDialog component, which passes the completions array to the JsonInput component when the user switches to the JSON editing tab.

Code Reference

Source Location

Signature

export const COMPACTION_CONFIG_COMPLETIONS: JsonCompletionRule[]

Import

import { COMPACTION_CONFIG_COMPLETIONS } from './compaction-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_CONFIG_COMPLETIONS JsonCompletionRule[] Array of completion rules covering root-level properties (dataSource, skipOffsetFromLatest, taskPriority, tuningConfig, ioConfig, dimensionsSpec, transformSpec, metricsSpec, granularitySpec, taskContext), nested tuningConfig and partitionsSpec properties, and conditional completions for dynamic, hashed, range, and single_dim partition types

Usage Examples

Providing completions to JsonInput

import { COMPACTION_CONFIG_COMPLETIONS } from './compaction-config-completions';

<JsonInput
  value={currentConfig}
  onChange={setCurrentConfig}
  setError={setJsonError}
  issueWithValue={value => AutoForm.issueWithModel(value, COMPACTION_CONFIG_FIELDS)}
  height="100%"
  jsonCompletions={COMPACTION_CONFIG_COMPLETIONS}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment