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 ServicesView

From Leeroopedia


Knowledge Sources
Domains Web Console, Service Management
Last Updated 2026-02-10 10:00 GMT

Overview

Renders the Services management view in the Apache Druid web console, displaying a table of all running Druid services with their status, resource utilization, and management actions.

Description

The ServicesView is a React class component extending PureComponent that queries sys.servers to display all Druid services (coordinators, overlords, routers, brokers, historicals, indexers, middle managers, and peons). It shows service metadata including type, tier, host, port, current/max size, disk usage, start time, version, available processors, total memory, and labels. The view augments service data with load queue information from the Coordinator API and worker information from the Overlord API. It supports grouping by service type or tier, and provides actions to enable/disable middle manager workers.

Usage

Rendered as the main content area when the user navigates to the "Services" tab in the web console. Requires SQL or Coordinator access capability.

Code Reference

Source Location

Signature

export interface ServicesViewProps {
  filters: TableFilters;
  onFiltersChange(filters: TableFilters): void;
  goToQuery(queryWithContext: QueryWithContext): void;
  capabilities: Capabilities;
}

export interface ServicesViewState {
  servicesState: QueryState<ServicesWithAuxiliaryInfo>;
  groupServicesBy?: 'service_type' | 'tier';
  middleManagerDisableWorkerHost?: string;
  middleManagerEnableWorkerHost?: string;
  serviceTableActionDialogServer?: string;
  serviceTableActionDialogActions: BasicAction[];
  visibleColumns: LocalStorageBackedVisibility;
}

export const LoadQueueInfoContext = createContext<Record<string, LoadQueueInfo>>({});

export class ServicesView extends React.PureComponent<ServicesViewProps, ServicesViewState>

Import

import { ServicesView } from '../../views/services-view/services-view';

I/O Contract

Inputs

Name Type Required Description
filters TableFilters Yes Current table filter state for filtering the services table.
onFiltersChange (filters: TableFilters) => void Yes Callback invoked when the user changes table filters.
goToQuery (queryWithContext: QueryWithContext) => void Yes Callback to navigate to the Query view with a pre-populated query.
capabilities Capabilities Yes The detected cluster capabilities, determining which columns and features are available.

Outputs

Name Type Description
JSX.Element React element Renders the complete services view including control bar, ReactTable with optional grouping, and action dialogs.

Usage Examples

Rendering the Services View

<ServicesView
  filters={serviceFilters}
  onFiltersChange={setServiceFilters}
  goToQuery={handleGoToQuery}
  capabilities={capabilities}
/>

Internals

Table Columns by Mode

Mode Columns Available
full Service, Type, Tier, Host, Port, Current size, Max size, Usage, Start time, Version, Available processors, Total memory, Labels, Detail
no-sql Service, Type, Tier, Host, Port, Current size, Max size, Usage, Detail
no-proxy Service, Type, Tier, Host, Port, Current size, Max size, Usage, Start time, Version

Service Ranking

Services are sorted by type priority (highest to lowest):

  1. coordinator (8)
  2. overlord (7)
  3. router (6)
  4. broker (5)
  5. historical (4)
  6. indexer (3)
  7. middle_manager (2)
  8. peon (1)

SQL Query

SELECT
  "server" AS "service",
  "server_type" AS "service_type",
  "tier", "host", "plaintext_port", "tls_port",
  "curr_size", "max_size", "is_leader",
  "start_time", "version", "labels",
  "available_processors", "total_memory"
FROM sys.servers
ORDER BY (CASE "server_type" ... END) DESC, "service" DESC

Auxiliary Data

The view fetches supplementary information alongside the main query:

Source Endpoint Data
Load Queue Info /druid/coordinator/v1/loadqueue?simple Segments to load/drop per historical with sizes and expected load times
Worker Info /druid/indexer/v1/workers Worker capacity, running tasks, and blacklist status for middle managers

LoadQueueInfoContext

The component exports a LoadQueueInfoContext React context that provides load queue information to child components (like FillIndicator) for displaying historical disk usage and load queue details.

Grouping

Services can be optionally grouped by:

  • service_type -- Groups all services of the same type together with aggregated size totals
  • tier -- Groups services by their assigned tier

Middle Manager Actions

For middle manager services, the view provides enable/disable worker actions via:

  • POST /druid/indexer/v1/worker/{host}/disable
  • POST /druid/indexer/v1/worker/{host}/enable

Related Pages

Page Connections

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