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 CompactionDynamicConfigDialog

From Leeroopedia


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

Overview

A React dialog component for viewing and editing the cluster-wide compaction dynamic configuration in the Druid web console.

Description

CompactionDynamicConfigDialog is a memoized React component that renders a Blueprint.js Dialog for editing the global compaction dynamic configuration. On mount, it fetches the current configuration from the /druid/indexer/v1/compaction/config/cluster API endpoint. It provides both a form-based editor (using AutoForm with COMPACTION_DYNAMIC_CONFIG_FIELDS) and a JSON editor (using JsonInput with COMPACTION_DYNAMIC_CONFIG_COMPLETIONS). The dialog displays a computed description of the maximum task slots formula based on the current compactionTaskSlotRatio and maxCompactionTaskSlots values. On save, it POSTs the updated config back to the same API endpoint and optionally triggers a page reload when the user is on the datasources page (since supervisor-based compaction changes affect displayed data).

Usage

This dialog is opened from the datasources view or compaction management area when a user wants to configure cluster-wide compaction behavior such as task slot ratios, compaction policy, engine selection, and supervisor usage.

Code Reference

Source Location

Signature

export interface CompactionDynamicConfigDialogProps {
  onClose(): void;
}

export const CompactionDynamicConfigDialog = React.memo(function CompactionDynamicConfigDialog(
  props: CompactionDynamicConfigDialogProps,
): JSX.Element)

Import

import { CompactionDynamicConfigDialog } from '../../dialogs/compaction-dynamic-config-dialog/compaction-dynamic-config-dialog';

I/O Contract

Inputs

Name Type Required Description
onClose () => void Yes Callback invoked when the dialog is closed (after save or cancel)

Outputs

Name Type Description
JSX.Element React element Renders a dialog with a task-slot formula description, form/JSON tabs for editing compaction dynamic config, a loader while fetching, and a Save button that persists changes via the Druid API

Usage Examples

Opening the compaction dynamic config dialog

{showCompactionDynamicConfig && (
  <CompactionDynamicConfigDialog
    onClose={() => setShowCompactionDynamicConfig(false)}
  />
)}

Related Pages

Page Connections

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