Implementation:Apache Druid Supervisor Submit Api
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Streaming_Ingestion, Task_Management |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
Concrete API call for submitting a streaming supervisor specification to the Druid Overlord supervisor endpoint.
Description
The handleSubmitSupervisor method in LoadDataView POSTs the complete supervisor spec to /druid/indexer/v1/supervisor via the Api singleton. It supports:
- New supervisor: Creates a new streaming ingestion supervisor
- Spec update: Replaces an existing supervisor's spec (hot swap)
- Suspended start: Optionally suspends the supervisor immediately after creation
On success, it navigates to the Supervisors view filtered by the supervisor ID.
Usage
Call this function when the user clicks "Submit" in the streaming ingestion wizard's final step.
Code Reference
Source Location
- Repository: Apache Druid
- File: web-console/src/views/load-data-view/load-data-view.tsx
- Lines: L3721-L3749
Signature
// LoadDataView class method
private handleSubmitSupervisor = async (): Promise<void> => {
const { spec } = this.state;
// POSTs to /druid/indexer/v1/supervisor
// If submitInSuspendedState: also POSTs to /druid/indexer/v1/supervisor/{id}/suspend
}
// Underlying API call:
Api.instance.post('/druid/indexer/v1/supervisor', spec)
// Returns: { id: string }
Import
import { Api } from '../../singletons';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| spec | Partial<IngestionSpec> | Yes | Complete supervisor spec with kafka/kinesis ioConfig |
| submitInSuspendedState | boolean | No | Whether to suspend the supervisor immediately after creation |
Outputs
| Name | Type | Description |
|---|---|---|
| id | string | Supervisor ID returned from the Druid Overlord |
| navigation | URL change | Browser navigates to Supervisors view filtered by supervisor_id |
Usage Examples
Submitting a Kafka Supervisor
import { Api } from '../../singletons';
const supervisorSpec = {
type: 'kafka',
spec: {
dataSchema: {
dataSource: 'streaming_events',
timestampSpec: { column: 'ts', format: 'iso' },
dimensionsSpec: { dimensions: ['user', 'action'] },
granularitySpec: { segmentGranularity: 'HOUR', queryGranularity: 'MINUTE', rollup: false },
},
ioConfig: {
type: 'kafka',
consumerProperties: { 'bootstrap.servers': 'kafka:9092' },
topic: 'events',
inputFormat: { type: 'json' },
taskDuration: 'PT1H',
},
tuningConfig: { type: 'kafka', maxRowsPerSegment: 5000000 },
},
};
const response = await Api.instance.post('/druid/indexer/v1/supervisor', supervisorSpec);
const supervisorId = response.data.id;
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment