Implementation:Apache Druid KillDatasourceDialog
| Knowledge Sources | |
|---|---|
| Domains | Web_Console, Datasource_Management |
| Last Updated | 2026-02-10 10:00 GMT |
Overview
KillDatasourceDialog is a React dialog component that allows users to permanently delete unused segments for a datasource within a specified time interval.
Description
The KillDatasourceDialog component wraps an AsyncActionDialog to confirm and execute a kill task against the Druid Coordinator API. It issues a DELETE request to remove unused segments for the specified datasource and interval. The dialog provides suggested intervals (defaulting to 24 hours ago to avoid conflicts with streaming ingestion), requires the user to confirm two warning checkboxes acknowledging data loss, and sends the request via the Coordinator's datasource intervals endpoint.
Usage
Used from the datasources view when an administrator wants to permanently delete unused segments and their metadata from deep storage for a specific datasource.
Code Reference
Source Location
- Repository: Apache Druid
- File: web-console/src/dialogs/kill-datasource-dialog/kill-datasource-dialog.tsx
- Lines: 1-116
Signature
export interface KillDatasourceDialogProps {
datasource: string;
onClose(): void;
onSuccess(): void;
}
export const KillDatasourceDialog = function KillDatasourceDialog(
props: KillDatasourceDialogProps,
): JSX.Element;
Import
import { KillDatasourceDialog } from 'web-console/src/dialogs/kill-datasource-dialog/kill-datasource-dialog';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| datasource | string | Yes | Name of the datasource whose unused segments will be deleted |
| onClose | () => void | Yes | Callback invoked when the dialog is closed |
| onSuccess | () => void | Yes | Callback invoked after the kill task is successfully submitted |
Outputs
| Name | Type | Description |
|---|---|---|
| rendered dialog | JSX.Element | An AsyncActionDialog with interval selection, warning checkboxes, and a DELETE request to /druid/coordinator/v1/datasources/{datasource}/intervals/{interval} |
Usage Examples
Killing Unused Segments
<KillDatasourceDialog
datasource="wikipedia"
onClose={() => setShowKillDialog(false)}
onSuccess={() => refreshDatasources()}
/>