Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Apache Druid Supervisor Status Api

From Leeroopedia


Knowledge Sources
Domains Streaming_Ingestion, Monitoring
Last Updated 2026-02-10 00:00 GMT

Overview

Concrete view and dialog components for monitoring streaming supervisor health, lag, and task statistics.

Description

The supervisor monitoring implementation spans multiple components:

  • SupervisorsView (L298-L430): Fetches supervisor list via SQL (sys.supervisors) or REST API, renders a ReactTable with supervisor name, type, status, datasource, and health indicator
  • SupervisorTableActionDialog (L39-L103): Four-tab dialog showing Status (JSON), Task Stats, Spec, and History
  • SupervisorStatisticsTable (L52-L169): Real-time task statistics table with 1500ms auto-refresh showing per-task rows processed, bytes, rates, and lag

Usage

The SupervisorsView is rendered as the main view at the #supervisors route. The action dialog opens when clicking a supervisor row.

Code Reference

Source Location

  • Repository: Apache Druid
  • File: web-console/src/views/supervisors-view/supervisors-view.tsx (L298-L430)
  • File: web-console/src/dialogs/supervisor-table-action-dialog/supervisor-statistics-table/supervisor-statistics-table.tsx (L52-L169)

Signature

// SupervisorsView fetches supervisor data via:
// SQL: SELECT * FROM sys.supervisors
// REST: GET /druid/indexer/v1/supervisor?full

// Per-supervisor status:
// GET /druid/indexer/v1/supervisor/{id}/status

// Per-supervisor stats (1500ms refresh):
// GET /druid/indexer/v1/supervisor/{id}/stats

Import

import { SupervisorsView } from './views/supervisors-view/supervisors-view';

I/O Contract

Inputs

Name Type Required Description
supervisorId string Yes Supervisor ID for status/stats queries (via action dialog)

Outputs

Name Type Description
Supervisor table visual Table with all supervisors, their type, status, and health
Status dialog visual JSON status payload with lag, offsets, and health
Statistics table visual Per-task throughput metrics with auto-refresh

Usage Examples

Monitoring API Calls

import { Api } from '../../singletons';

// List all supervisors:
const supervisors = await Api.instance.get('/druid/indexer/v1/supervisor?full');

// Get specific supervisor status:
const status = await Api.instance.get('/druid/indexer/v1/supervisor/my-kafka-supervisor/status');
// status.data = {
//   state: 'RUNNING',
//   detailedState: 'RUNNING',
//   healthy: true,
//   latestOffsets: { '0': 12345, '1': 12340 },
//   minimumLag: { '0': 5, '1': 10 },
// }

// Get task statistics:
const stats = await Api.instance.get('/druid/indexer/v1/supervisor/my-kafka-supervisor/stats');
// stats.data = {
//   'task-abc': { rowsProcessed: 50000, bytesProcessed: 12000000, processingRate: 5000 },
// }

Related Pages

Implements Principle

Requires Environment

Uses Heuristic

Page Connections

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