Apache Druid
  • Technology
  • Use Cases
  • Powered By
  • Docs
  • Community
  • Apache
  • Download

›HTTP APIs

Getting started

  • Introduction to Apache Druid
  • Quickstart (local)
  • Single server deployment
  • Clustered deployment

Tutorials

  • Load files using SQL
  • Load from Apache Kafka
  • Load from Apache Hadoop
  • Query data
  • Aggregate data with rollup
  • Theta sketches
  • Configure data retention
  • Update existing data
  • Compact segments
  • Deleting data
  • Write an ingestion spec
  • Transform input data
  • Convert ingestion spec to SQL
  • Run with Docker
  • Kerberized HDFS deep storage
  • Get to know Query view
  • Unnesting arrays
  • Query from deep storage
  • Jupyter Notebook tutorials
  • Docker for tutorials
  • JDBC connector

Design

  • Design
  • Segments
  • Processes and servers
  • Deep storage
  • Metadata storage
  • ZooKeeper

Ingestion

  • Overview
  • Ingestion concepts

    • Source input formats
    • Input sources
    • Schema model
    • Rollup
    • Partitioning
    • Task reference

    SQL-based batch

    • SQL-based ingestion
    • Key concepts
    • Security
    • Examples
    • Reference
    • Known issues

    Streaming

    • Apache Kafka ingestion
    • Apache Kafka supervisor
    • Apache Kafka operations
    • Amazon Kinesis

    Classic batch

    • JSON-based batch
    • Hadoop-based
  • Ingestion spec reference
  • Schema design tips
  • Troubleshooting FAQ

Data management

  • Overview
  • Data updates
  • Data deletion
  • Schema changes
  • Compaction
  • Automatic compaction

Querying

    Druid SQL

    • Overview and syntax
    • Query from deep storage
    • SQL data types
    • Operators
    • Scalar functions
    • Aggregation functions
    • Array functions
    • Multi-value string functions
    • JSON functions
    • All functions
    • SQL query context
    • SQL metadata tables
    • SQL query translation
  • Native queries
  • Query execution
  • Troubleshooting
  • Concepts

    • Datasources
    • Joins
    • Lookups
    • Multi-value dimensions
    • Nested columns
    • Multitenancy
    • Query caching
    • Using query caching
    • Query context

    Native query types

    • Timeseries
    • TopN
    • GroupBy
    • Scan
    • Search
    • TimeBoundary
    • SegmentMetadata
    • DatasourceMetadata

    Native query components

    • Filters
    • Granularities
    • Dimensions
    • Aggregations
    • Post-aggregations
    • Expressions
    • Having filters (groupBy)
    • Sorting and limiting (groupBy)
    • Sorting (topN)
    • String comparators
    • Virtual columns
    • Spatial filters

API reference

  • Overview
  • HTTP APIs

    • Druid SQL
    • SQL-based ingestion
    • JSON querying
    • Tasks
    • Supervisors
    • Retention rules
    • Data management
    • Automatic compaction
    • Lookups
    • Service status
    • Dynamic configuration
    • Legacy metadata

    Java APIs

    • SQL JDBC driver

Configuration

  • Configuration reference
  • Extensions
  • Logging

Operations

  • Web console
  • Java runtime
  • Durable storage
  • Security

    • Security overview
    • User authentication and authorization
    • LDAP auth
    • Password providers
    • Dynamic Config Providers
    • TLS support

    Performance tuning

    • Basic cluster tuning
    • Segment size optimization
    • Mixed workloads
    • HTTP compression
    • Automated metadata cleanup

    Monitoring

    • Request logging
    • Metrics
    • Alerts
  • High availability
  • Rolling updates
  • Using rules to drop and retain data
  • Migrate from firehose
  • Working with different versions of Apache Hadoop
  • Misc

    • dump-segment tool
    • reset-cluster tool
    • insert-segment-to-db tool
    • pull-deps tool
    • Deep storage migration
    • Export Metadata Tool
    • Metadata Migration
    • Content for build.sbt

Development

  • Developing on Druid
  • Creating extensions
  • JavaScript functionality
  • Build from source
  • Versioning
  • Contribute to Druid docs
  • Experimental features

Misc

  • Papers

Hidden

  • Apache Druid vs Elasticsearch
  • Apache Druid vs. Key/Value Stores (HBase/Cassandra/OpenTSDB)
  • Apache Druid vs Kudu
  • Apache Druid vs Redshift
  • Apache Druid vs Spark
  • Apache Druid vs SQL-on-Hadoop
  • Authentication and Authorization
  • Broker
  • Coordinator Process
  • Historical Process
  • Indexer Process
  • Indexing Service
  • MiddleManager Process
  • Overlord Process
  • Router Process
  • Peons
  • Approximate Histogram aggregators
  • Apache Avro
  • Microsoft Azure
  • Bloom Filter
  • DataSketches extension
  • DataSketches HLL Sketch module
  • DataSketches Quantiles Sketch module
  • DataSketches Theta Sketch module
  • DataSketches Tuple Sketch module
  • Basic Security
  • Kerberos
  • Cached Lookup Module
  • Apache Ranger Security
  • Google Cloud Storage
  • HDFS
  • Apache Kafka Lookups
  • Globally Cached Lookups
  • MySQL Metadata Store
  • ORC Extension
  • Druid pac4j based Security extension
  • Apache Parquet Extension
  • PostgreSQL Metadata Store
  • Protobuf
  • S3-compatible
  • Simple SSLContext Provider Module
  • Stats aggregator
  • Test Stats Aggregators
  • Druid AWS RDS Module
  • Kubernetes
  • Ambari Metrics Emitter
  • Apache Cassandra
  • Rackspace Cloud Files
  • DistinctCount Aggregator
  • Graphite Emitter
  • InfluxDB Line Protocol Parser
  • InfluxDB Emitter
  • Kafka Emitter
  • Materialized View
  • Moment Sketches for Approximate Quantiles module
  • Moving Average Query
  • OpenTSDB Emitter
  • Druid Redis Cache
  • Microsoft SQLServer
  • StatsD Emitter
  • T-Digest Quantiles Sketch module
  • Thrift
  • Timestamp Min/Max aggregators
  • GCE Extensions
  • Aliyun OSS
  • Prometheus Emitter
  • Firehose (deprecated)
  • JSON-based batch (simple)
  • Realtime Process
  • kubernetes
  • Cardinality/HyperUnique aggregators
  • Select
  • Load files natively
Edit

Supervisor API

This topic describes the API endpoints to manage and monitor supervisors for Apache Druid.

In this topic, http://ROUTER_IP:ROUTER_PORT is a placeholder for your Router service address and port. Replace it with the information for your deployment. For example, use http://localhost:8888 for quickstart deployments.

Supervisor information

The following table lists the properties of a supervisor object:

PropertyTypeDescription
idStringUnique identifier.
stateStringGeneric state of the supervisor. Available states:UNHEALTHY_SUPERVISOR, UNHEALTHY_TASKS, PENDING, RUNNING, SUSPENDED, STOPPING. See Apache Kafka operations for details.
detailedStateStringDetailed state of the supervisor. This property contains a more descriptive, implementation-specific state that may provide more insight into the supervisor's activities than the state property. See Apache Kafka ingestion and Amazon Kinesis ingestion for supervisor-specific states.
healthyBooleanSupervisor health indicator.
specObjectContainer object for the supervisor configuration.
suspendedBooleanIndicates whether the supervisor is in a suspended state.

Get an array of active supervisor IDs

Returns an array of strings representing the names of active supervisors. If there are no active supervisors, it returns an empty array.

URL

GET /druid/indexer/v1/supervisor

Responses

200 SUCCESS

Successfully retrieved array of active supervisor IDs


Sample request

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor"
GET /druid/indexer/v1/supervisor HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

[
  "wikipedia_stream",
  "social_media"
]

Get an array of active supervisor objects

Retrieves an array of active supervisor objects. If there are no active supervisors, it returns an empty array. For reference on the supervisor object properties, see the preceding table.

URL

GET /druid/indexer/v1/supervisor?full

Responses

200 SUCCESS

Successfully retrieved supervisor objects


Sample request

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor?full=null"
GET /druid/indexer/v1/supervisor?full=null HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

[
  {
      "id": "wikipedia_stream",
      "state": "RUNNING",
      "detailedState": "CONNECTING_TO_STREAM",
      "healthy": true,
      "spec": {
          "type": "kafka",
          "spec": {
              "dataSchema": {
                  "dataSource": "wikipedia_stream",
                  "timestampSpec": {
                      "column": "__time",
                      "format": "iso",
                      "missingValue": null
                  },
                  "dimensionsSpec": {
                      "dimensions": [
                          {
                              "type": "string",
                              "name": "username",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "string",
                              "name": "post_title",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "long",
                              "name": "views",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "upvotes",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "comments",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "string",
                              "name": "edited",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          }
                      ],
                      "dimensionExclusions": [
                          "__time"
                      ],
                      "includeAllDimensions": false,
                      "useSchemaDiscovery": false
                  },
                  "metricsSpec": [],
                  "granularitySpec": {
                      "type": "uniform",
                      "segmentGranularity": "HOUR",
                      "queryGranularity": {
                          "type": "none"
                      },
                      "rollup": false,
                      "intervals": []
                  },
                  "transformSpec": {
                      "filter": null,
                      "transforms": []
                  }
              },
              "ioConfig": {
                  "topic": "social_media",
                  "inputFormat": {
                      "type": "json",
                      "keepNullColumns": false,
                      "assumeNewlineDelimited": false,
                      "useJsonNodeReader": false
                  },
                  "replicas": 1,
                  "taskCount": 1,
                  "taskDuration": "PT3600S",
                  "consumerProperties": {
                      "bootstrap.servers": "localhost:9042"
                  },
                  "autoScalerConfig": null,
                  "pollTimeout": 100,
                  "startDelay": "PT5S",
                  "period": "PT30S",
                  "useEarliestOffset": true,
                  "completionTimeout": "PT1800S",
                  "lateMessageRejectionPeriod": null,
                  "earlyMessageRejectionPeriod": null,
                  "lateMessageRejectionStartDateTime": null,
                  "configOverrides": null,
                  "idleConfig": null,
                  "stream": "social_media",
                  "useEarliestSequenceNumber": true
              },
              "tuningConfig": {
                  "type": "kafka",
                  "appendableIndexSpec": {
                      "type": "onheap",
                      "preserveExistingMetrics": false
                  },
                  "maxRowsInMemory": 150000,
                  "maxBytesInMemory": 0,
                  "skipBytesInMemoryOverheadCheck": false,
                  "maxRowsPerSegment": 5000000,
                  "maxTotalRows": null,
                  "intermediatePersistPeriod": "PT10M",
                  "maxPendingPersists": 0,
                  "indexSpec": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "indexSpecForIntermediatePersists": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "reportParseExceptions": false,
                  "handoffConditionTimeout": 0,
                  "resetOffsetAutomatically": false,
                  "segmentWriteOutMediumFactory": null,
                  "workerThreads": null,
                  "chatRetries": 8,
                  "httpTimeout": "PT10S",
                  "shutdownTimeout": "PT80S",
                  "offsetFetchPeriod": "PT30S",
                  "intermediateHandoffPeriod": "P2147483647D",
                  "logParseExceptions": false,
                  "maxParseExceptions": 2147483647,
                  "maxSavedParseExceptions": 0,
                  "skipSequenceNumberAvailabilityCheck": false,
                  "repartitionTransitionDuration": "PT120S"
              }
          },
          "dataSchema": {
              "dataSource": "wikipedia_stream",
              "timestampSpec": {
                  "column": "__time",
                  "format": "iso",
                  "missingValue": null
              },
              "dimensionsSpec": {
                  "dimensions": [
                      {
                          "type": "string",
                          "name": "username",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      },
                      {
                          "type": "string",
                          "name": "post_title",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      },
                      {
                          "type": "long",
                          "name": "views",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "long",
                          "name": "upvotes",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "long",
                          "name": "comments",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "string",
                          "name": "edited",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      }
                  ],
                  "dimensionExclusions": [
                      "__time"
                  ],
                  "includeAllDimensions": false,
                  "useSchemaDiscovery": false
              },
              "metricsSpec": [],
              "granularitySpec": {
                  "type": "uniform",
                  "segmentGranularity": "HOUR",
                  "queryGranularity": {
                      "type": "none"
                  },
                  "rollup": false,
                  "intervals": []
              },
              "transformSpec": {
                  "filter": null,
                  "transforms": []
              }
          },
          "tuningConfig": {
              "type": "kafka",
              "appendableIndexSpec": {
                  "type": "onheap",
                  "preserveExistingMetrics": false
              },
              "maxRowsInMemory": 150000,
              "maxBytesInMemory": 0,
              "skipBytesInMemoryOverheadCheck": false,
              "maxRowsPerSegment": 5000000,
              "maxTotalRows": null,
              "intermediatePersistPeriod": "PT10M",
              "maxPendingPersists": 0,
              "indexSpec": {
                  "bitmap": {
                      "type": "roaring"
                  },
                  "dimensionCompression": "lz4",
                  "stringDictionaryEncoding": {
                      "type": "utf8"
                  },
                  "metricCompression": "lz4",
                  "longEncoding": "longs"
              },
              "indexSpecForIntermediatePersists": {
                  "bitmap": {
                      "type": "roaring"
                  },
                  "dimensionCompression": "lz4",
                  "stringDictionaryEncoding": {
                      "type": "utf8"
                  },
                  "metricCompression": "lz4",
                  "longEncoding": "longs"
              },
              "reportParseExceptions": false,
              "handoffConditionTimeout": 0,
              "resetOffsetAutomatically": false,
              "segmentWriteOutMediumFactory": null,
              "workerThreads": null,
              "chatRetries": 8,
              "httpTimeout": "PT10S",
              "shutdownTimeout": "PT80S",
              "offsetFetchPeriod": "PT30S",
              "intermediateHandoffPeriod": "P2147483647D",
              "logParseExceptions": false,
              "maxParseExceptions": 2147483647,
              "maxSavedParseExceptions": 0,
              "skipSequenceNumberAvailabilityCheck": false,
              "repartitionTransitionDuration": "PT120S"
          },
          "ioConfig": {
              "topic": "social_media",
              "inputFormat": {
                  "type": "json",
                  "keepNullColumns": false,
                  "assumeNewlineDelimited": false,
                  "useJsonNodeReader": false
              },
              "replicas": 1,
              "taskCount": 1,
              "taskDuration": "PT3600S",
              "consumerProperties": {
                  "bootstrap.servers": "localhost:9042"
              },
              "autoScalerConfig": null,
              "pollTimeout": 100,
              "startDelay": "PT5S",
              "period": "PT30S",
              "useEarliestOffset": true,
              "completionTimeout": "PT1800S",
              "lateMessageRejectionPeriod": null,
              "earlyMessageRejectionPeriod": null,
              "lateMessageRejectionStartDateTime": null,
              "configOverrides": null,
              "idleConfig": null,
              "stream": "social_media",
              "useEarliestSequenceNumber": true
          },
          "context": null,
          "suspended": false
      },
      "suspended": false
  },
  {
      "id": "social_media",
      "state": "RUNNING",
      "detailedState": "RUNNING",
      "healthy": true,
      "spec": {
          "type": "kafka",
          "spec": {
              "dataSchema": {
                  "dataSource": "social_media",
                  "timestampSpec": {
                      "column": "__time",
                      "format": "iso",
                      "missingValue": null
                  },
                  "dimensionsSpec": {
                      "dimensions": [
                          {
                              "type": "string",
                              "name": "username",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "string",
                              "name": "post_title",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "long",
                              "name": "views",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "upvotes",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "comments",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "string",
                              "name": "edited",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          }
                      ],
                      "dimensionExclusions": [
                          "__time"
                      ],
                      "includeAllDimensions": false,
                      "useSchemaDiscovery": false
                  },
                  "metricsSpec": [],
                  "granularitySpec": {
                      "type": "uniform",
                      "segmentGranularity": "HOUR",
                      "queryGranularity": {
                          "type": "none"
                      },
                      "rollup": false,
                      "intervals": []
                  },
                  "transformSpec": {
                      "filter": null,
                      "transforms": []
                  }
              },
              "ioConfig": {
                  "topic": "social_media",
                  "inputFormat": {
                      "type": "json",
                      "keepNullColumns": false,
                      "assumeNewlineDelimited": false,
                      "useJsonNodeReader": false
                  },
                  "replicas": 1,
                  "taskCount": 1,
                  "taskDuration": "PT3600S",
                  "consumerProperties": {
                      "bootstrap.servers": "localhost:9094"
                  },
                  "autoScalerConfig": null,
                  "pollTimeout": 100,
                  "startDelay": "PT5S",
                  "period": "PT30S",
                  "useEarliestOffset": true,
                  "completionTimeout": "PT1800S",
                  "lateMessageRejectionPeriod": null,
                  "earlyMessageRejectionPeriod": null,
                  "lateMessageRejectionStartDateTime": null,
                  "configOverrides": null,
                  "idleConfig": null,
                  "stream": "social_media",
                  "useEarliestSequenceNumber": true
              },
              "tuningConfig": {
                  "type": "kafka",
                  "appendableIndexSpec": {
                      "type": "onheap",
                      "preserveExistingMetrics": false
                  },
                  "maxRowsInMemory": 150000,
                  "maxBytesInMemory": 0,
                  "skipBytesInMemoryOverheadCheck": false,
                  "maxRowsPerSegment": 5000000,
                  "maxTotalRows": null,
                  "intermediatePersistPeriod": "PT10M",
                  "maxPendingPersists": 0,
                  "indexSpec": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "indexSpecForIntermediatePersists": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "reportParseExceptions": false,
                  "handoffConditionTimeout": 0,
                  "resetOffsetAutomatically": false,
                  "segmentWriteOutMediumFactory": null,
                  "workerThreads": null,
                  "chatRetries": 8,
                  "httpTimeout": "PT10S",
                  "shutdownTimeout": "PT80S",
                  "offsetFetchPeriod": "PT30S",
                  "intermediateHandoffPeriod": "P2147483647D",
                  "logParseExceptions": false,
                  "maxParseExceptions": 2147483647,
                  "maxSavedParseExceptions": 0,
                  "skipSequenceNumberAvailabilityCheck": false,
                  "repartitionTransitionDuration": "PT120S"
              }
          },
          "dataSchema": {
              "dataSource": "social_media",
              "timestampSpec": {
                  "column": "__time",
                  "format": "iso",
                  "missingValue": null
              },
              "dimensionsSpec": {
                  "dimensions": [
                      {
                          "type": "string",
                          "name": "username",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      },
                      {
                          "type": "string",
                          "name": "post_title",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      },
                      {
                          "type": "long",
                          "name": "views",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "long",
                          "name": "upvotes",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "long",
                          "name": "comments",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "string",
                          "name": "edited",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      }
                  ],
                  "dimensionExclusions": [
                      "__time"
                  ],
                  "includeAllDimensions": false,
                  "useSchemaDiscovery": false
              },
              "metricsSpec": [],
              "granularitySpec": {
                  "type": "uniform",
                  "segmentGranularity": "HOUR",
                  "queryGranularity": {
                      "type": "none"
                  },
                  "rollup": false,
                  "intervals": []
              },
              "transformSpec": {
                  "filter": null,
                  "transforms": []
              }
          },
          "tuningConfig": {
              "type": "kafka",
              "appendableIndexSpec": {
                  "type": "onheap",
                  "preserveExistingMetrics": false
              },
              "maxRowsInMemory": 150000,
              "maxBytesInMemory": 0,
              "skipBytesInMemoryOverheadCheck": false,
              "maxRowsPerSegment": 5000000,
              "maxTotalRows": null,
              "intermediatePersistPeriod": "PT10M",
              "maxPendingPersists": 0,
              "indexSpec": {
                  "bitmap": {
                      "type": "roaring"
                  },
                  "dimensionCompression": "lz4",
                  "stringDictionaryEncoding": {
                      "type": "utf8"
                  },
                  "metricCompression": "lz4",
                  "longEncoding": "longs"
              },
              "indexSpecForIntermediatePersists": {
                  "bitmap": {
                      "type": "roaring"
                  },
                  "dimensionCompression": "lz4",
                  "stringDictionaryEncoding": {
                      "type": "utf8"
                  },
                  "metricCompression": "lz4",
                  "longEncoding": "longs"
              },
              "reportParseExceptions": false,
              "handoffConditionTimeout": 0,
              "resetOffsetAutomatically": false,
              "segmentWriteOutMediumFactory": null,
              "workerThreads": null,
              "chatRetries": 8,
              "httpTimeout": "PT10S",
              "shutdownTimeout": "PT80S",
              "offsetFetchPeriod": "PT30S",
              "intermediateHandoffPeriod": "P2147483647D",
              "logParseExceptions": false,
              "maxParseExceptions": 2147483647,
              "maxSavedParseExceptions": 0,
              "skipSequenceNumberAvailabilityCheck": false,
              "repartitionTransitionDuration": "PT120S"
          },
          "ioConfig": {
              "topic": "social_media",
              "inputFormat": {
                  "type": "json",
                  "keepNullColumns": false,
                  "assumeNewlineDelimited": false,
                  "useJsonNodeReader": false
              },
              "replicas": 1,
              "taskCount": 1,
              "taskDuration": "PT3600S",
              "consumerProperties": {
                  "bootstrap.servers": "localhost:9094"
              },
              "autoScalerConfig": null,
              "pollTimeout": 100,
              "startDelay": "PT5S",
              "period": "PT30S",
              "useEarliestOffset": true,
              "completionTimeout": "PT1800S",
              "lateMessageRejectionPeriod": null,
              "earlyMessageRejectionPeriod": null,
              "lateMessageRejectionStartDateTime": null,
              "configOverrides": null,
              "idleConfig": null,
              "stream": "social_media",
              "useEarliestSequenceNumber": true
          },
          "context": null,
          "suspended": false
      },
      "suspended": false
  }
]

Get an array of supervisor states

Retrieves an array of objects representing active supervisors and their current state. If there are no active supervisors, it returns an empty array. For reference on the supervisor object properties, see the preceding table.

URL

GET /druid/indexer/v1/supervisor?state=true

Responses

200 SUCCESS

Successfully retrieved supervisor state objects


Sample request

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor?state=true"
GET /druid/indexer/v1/supervisor?state=true HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

[
  {
      "id": "wikipedia_stream",
      "state": "UNHEALTHY_SUPERVISOR",
      "detailedState": "UNABLE_TO_CONNECT_TO_STREAM",
      "healthy": false,
      "suspended": false
  },
  {
      "id": "social_media",
      "state": "RUNNING",
      "detailedState": "RUNNING",
      "healthy": true,
      "suspended": false
  }
]

Get supervisor specification

Retrieves the specification for a single supervisor. The returned specification includes the dataSchema, ioConfig, and tuningConfig objects.

URL

GET /druid/indexer/v1/supervisor/:supervisorId

Responses

200 SUCCESS
404 NOT FOUND

Successfully retrieved supervisor spec

Invalid supervisor ID


Sample request

The following example shows how to retrieve the specification of a supervisor with the name wikipedia_stream.

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/wikipedia_stream"
GET /druid/indexer/v1/supervisor/wikipedia_stream HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "type": "kafka",
  "spec": {
      "dataSchema": {
          "dataSource": "social_media",
          "timestampSpec": {
              "column": "__time",
              "format": "iso",
              "missingValue": null
          },
          "dimensionsSpec": {
              "dimensions": [
                  {
                      "type": "string",
                      "name": "username",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  },
                  {
                      "type": "string",
                      "name": "post_title",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  },
                  {
                      "type": "long",
                      "name": "views",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "long",
                      "name": "upvotes",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "long",
                      "name": "comments",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "string",
                      "name": "edited",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  }
              ],
              "dimensionExclusions": [
                  "__time"
              ],
              "includeAllDimensions": false,
              "useSchemaDiscovery": false
          },
          "metricsSpec": [],
          "granularitySpec": {
              "type": "uniform",
              "segmentGranularity": "HOUR",
              "queryGranularity": {
                  "type": "none"
              },
              "rollup": false,
              "intervals": []
          },
          "transformSpec": {
              "filter": null,
              "transforms": []
          }
      },
      "ioConfig": {
          "topic": "social_media",
          "inputFormat": {
              "type": "json",
              "keepNullColumns": false,
              "assumeNewlineDelimited": false,
              "useJsonNodeReader": false
          },
          "replicas": 1,
          "taskCount": 1,
          "taskDuration": "PT3600S",
          "consumerProperties": {
              "bootstrap.servers": "localhost:9094"
          },
          "autoScalerConfig": null,
          "pollTimeout": 100,
          "startDelay": "PT5S",
          "period": "PT30S",
          "useEarliestOffset": true,
          "completionTimeout": "PT1800S",
          "lateMessageRejectionPeriod": null,
          "earlyMessageRejectionPeriod": null,
          "lateMessageRejectionStartDateTime": null,
          "configOverrides": null,
          "idleConfig": null,
          "stream": "social_media",
          "useEarliestSequenceNumber": true
      },
      "tuningConfig": {
          "type": "kafka",
          "appendableIndexSpec": {
              "type": "onheap",
              "preserveExistingMetrics": false
          },
          "maxRowsInMemory": 150000,
          "maxBytesInMemory": 0,
          "skipBytesInMemoryOverheadCheck": false,
          "maxRowsPerSegment": 5000000,
          "maxTotalRows": null,
          "intermediatePersistPeriod": "PT10M",
          "maxPendingPersists": 0,
          "indexSpec": {
              "bitmap": {
                  "type": "roaring"
              },
              "dimensionCompression": "lz4",
              "stringDictionaryEncoding": {
                  "type": "utf8"
              },
              "metricCompression": "lz4",
              "longEncoding": "longs"
          },
          "indexSpecForIntermediatePersists": {
              "bitmap": {
                  "type": "roaring"
              },
              "dimensionCompression": "lz4",
              "stringDictionaryEncoding": {
                  "type": "utf8"
              },
              "metricCompression": "lz4",
              "longEncoding": "longs"
          },
          "reportParseExceptions": false,
          "handoffConditionTimeout": 0,
          "resetOffsetAutomatically": false,
          "segmentWriteOutMediumFactory": null,
          "workerThreads": null,
          "chatRetries": 8,
          "httpTimeout": "PT10S",
          "shutdownTimeout": "PT80S",
          "offsetFetchPeriod": "PT30S",
          "intermediateHandoffPeriod": "P2147483647D",
          "logParseExceptions": false,
          "maxParseExceptions": 2147483647,
          "maxSavedParseExceptions": 0,
          "skipSequenceNumberAvailabilityCheck": false,
          "repartitionTransitionDuration": "PT120S"
      }
  },
  "dataSchema": {
      "dataSource": "social_media",
      "timestampSpec": {
          "column": "__time",
          "format": "iso",
          "missingValue": null
      },
      "dimensionsSpec": {
          "dimensions": [
              {
                  "type": "string",
                  "name": "username",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              },
              {
                  "type": "string",
                  "name": "post_title",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              },
              {
                  "type": "long",
                  "name": "views",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "long",
                  "name": "upvotes",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "long",
                  "name": "comments",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "string",
                  "name": "edited",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              }
          ],
          "dimensionExclusions": [
              "__time"
          ],
          "includeAllDimensions": false,
          "useSchemaDiscovery": false
      },
      "metricsSpec": [],
      "granularitySpec": {
          "type": "uniform",
          "segmentGranularity": "HOUR",
          "queryGranularity": {
              "type": "none"
          },
          "rollup": false,
          "intervals": []
      },
      "transformSpec": {
          "filter": null,
          "transforms": []
      }
  },
  "tuningConfig": {
      "type": "kafka",
      "appendableIndexSpec": {
          "type": "onheap",
          "preserveExistingMetrics": false
      },
      "maxRowsInMemory": 150000,
      "maxBytesInMemory": 0,
      "skipBytesInMemoryOverheadCheck": false,
      "maxRowsPerSegment": 5000000,
      "maxTotalRows": null,
      "intermediatePersistPeriod": "PT10M",
      "maxPendingPersists": 0,
      "indexSpec": {
          "bitmap": {
              "type": "roaring"
          },
          "dimensionCompression": "lz4",
          "stringDictionaryEncoding": {
              "type": "utf8"
          },
          "metricCompression": "lz4",
          "longEncoding": "longs"
      },
      "indexSpecForIntermediatePersists": {
          "bitmap": {
              "type": "roaring"
          },
          "dimensionCompression": "lz4",
          "stringDictionaryEncoding": {
              "type": "utf8"
          },
          "metricCompression": "lz4",
          "longEncoding": "longs"
      },
      "reportParseExceptions": false,
      "handoffConditionTimeout": 0,
      "resetOffsetAutomatically": false,
      "segmentWriteOutMediumFactory": null,
      "workerThreads": null,
      "chatRetries": 8,
      "httpTimeout": "PT10S",
      "shutdownTimeout": "PT80S",
      "offsetFetchPeriod": "PT30S",
      "intermediateHandoffPeriod": "P2147483647D",
      "logParseExceptions": false,
      "maxParseExceptions": 2147483647,
      "maxSavedParseExceptions": 0,
      "skipSequenceNumberAvailabilityCheck": false,
      "repartitionTransitionDuration": "PT120S"
  },
  "ioConfig": {
      "topic": "social_media",
      "inputFormat": {
          "type": "json",
          "keepNullColumns": false,
          "assumeNewlineDelimited": false,
          "useJsonNodeReader": false
      },
      "replicas": 1,
      "taskCount": 1,
      "taskDuration": "PT3600S",
      "consumerProperties": {
          "bootstrap.servers": "localhost:9094"
      },
      "autoScalerConfig": null,
      "pollTimeout": 100,
      "startDelay": "PT5S",
      "period": "PT30S",
      "useEarliestOffset": true,
      "completionTimeout": "PT1800S",
      "lateMessageRejectionPeriod": null,
      "earlyMessageRejectionPeriod": null,
      "lateMessageRejectionStartDateTime": null,
      "configOverrides": null,
      "idleConfig": null,
      "stream": "social_media",
      "useEarliestSequenceNumber": true
  },
  "context": null,
  "suspended": false
}

Get supervisor status

Retrieves the current status report for a single supervisor. The report contains the state of the supervisor tasks and an array of recently thrown exceptions.

For additional information about the status report, see the topic for each streaming ingestion methods:

  • Amazon Kinesis
  • Apache Kafka

URL

GET /druid/indexer/v1/supervisor/:supervisorId/status

Responses

200 SUCCESS
404 NOT FOUND

Successfully retrieved supervisor status

Invalid supervisor ID


Sample request

The following example shows how to retrieve the status of a supervisor with the name social_media.

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/social_media/status"
GET /druid/indexer/v1/supervisor/social_media/status HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
    "id": "social_media",
    "generationTime": "2023-07-05T23:24:43.934Z",
    "payload": {
        "dataSource": "social_media",
        "stream": "social_media",
        "partitions": 1,
        "replicas": 1,
        "durationSeconds": 3600,
        "activeTasks": [
            {
                "id": "index_kafka_social_media_ab72ae4127c591c_flcbhdlh",
                "startingOffsets": {
                    "0": 3176381
                },
                "startTime": "2023-07-05T23:21:39.321Z",
                "remainingSeconds": 3415,
                "type": "ACTIVE",
                "currentOffsets": {
                    "0": 3296632
                },
                "lag": {
                    "0": 3
                }
            }
        ],
        "publishingTasks": [],
        "latestOffsets": {
            "0": 3296635
        },
        "minimumLag": {
            "0": 3
        },
        "aggregateLag": 3,
        "offsetsLastUpdated": "2023-07-05T23:24:30.212Z",
        "suspended": false,
        "healthy": true,
        "state": "RUNNING",
        "detailedState": "RUNNING",
        "recentErrors": []
    }
}

Audit history

An audit history provides a comprehensive log of events, including supervisor configuration, creation, suspension, and modification history.

Get audit history for all supervisors

Retrieve an audit history of specs for all supervisors.

URL

GET /druid/indexer/v1/supervisor/history

Responses

200 SUCCESS

Successfully retrieved audit history


Sample request

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/history"
GET /druid/indexer/v1/supervisor/history HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "social_media": [
      {
          "spec": {
              "type": "kafka",
              "spec": {
                  "dataSchema": {
                      "dataSource": "social_media",
                      "timestampSpec": {
                          "column": "__time",
                          "format": "iso",
                          "missingValue": null
                      },
                      "dimensionsSpec": {
                          "dimensions": [
                              {
                                  "type": "string",
                                  "name": "username",
                                  "multiValueHandling": "SORTED_ARRAY",
                                  "createBitmapIndex": true
                              },
                              {
                                  "type": "string",
                                  "name": "post_title",
                                  "multiValueHandling": "SORTED_ARRAY",
                                  "createBitmapIndex": true
                              },
                              {
                                  "type": "long",
                                  "name": "views",
                                  "multiValueHandling": "SORTED_ARRAY",
                                  "createBitmapIndex": false
                              },
                              {
                                  "type": "long",
                                  "name": "upvotes",
                                  "multiValueHandling": "SORTED_ARRAY",
                                  "createBitmapIndex": false
                              },
                              {
                                  "type": "long",
                                  "name": "comments",
                                  "multiValueHandling": "SORTED_ARRAY",
                                  "createBitmapIndex": false
                              },
                              {
                                  "type": "string",
                                  "name": "edited",
                                  "multiValueHandling": "SORTED_ARRAY",
                                  "createBitmapIndex": true
                              }
                          ],
                          "dimensionExclusions": [
                              "__time"
                          ],
                          "includeAllDimensions": false,
                          "useSchemaDiscovery": false
                      },
                      "metricsSpec": [],
                      "granularitySpec": {
                          "type": "uniform",
                          "segmentGranularity": "HOUR",
                          "queryGranularity": {
                              "type": "none"
                          },
                          "rollup": false,
                          "intervals": []
                      },
                      "transformSpec": {
                          "filter": null,
                          "transforms": []
                      }
                  },
                  "ioConfig": {
                      "topic": "social_media",
                      "inputFormat": {
                          "type": "json",
                          "keepNullColumns": false,
                          "assumeNewlineDelimited": false,
                          "useJsonNodeReader": false
                      },
                      "replicas": 1,
                      "taskCount": 1,
                      "taskDuration": "PT3600S",
                      "consumerProperties": {
                          "bootstrap.servers": "localhost:9094"
                      },
                      "autoScalerConfig": null,
                      "pollTimeout": 100,
                      "startDelay": "PT5S",
                      "period": "PT30S",
                      "useEarliestOffset": true,
                      "completionTimeout": "PT1800S",
                      "lateMessageRejectionPeriod": null,
                      "earlyMessageRejectionPeriod": null,
                      "lateMessageRejectionStartDateTime": null,
                      "configOverrides": null,
                      "idleConfig": null,
                      "stream": "social_media",
                      "useEarliestSequenceNumber": true
                  },
                  "tuningConfig": {
                      "type": "kafka",
                      "appendableIndexSpec": {
                          "type": "onheap",
                          "preserveExistingMetrics": false
                      },
                      "maxRowsInMemory": 150000,
                      "maxBytesInMemory": 0,
                      "skipBytesInMemoryOverheadCheck": false,
                      "maxRowsPerSegment": 5000000,
                      "maxTotalRows": null,
                      "intermediatePersistPeriod": "PT10M",
                      "maxPendingPersists": 0,
                      "indexSpec": {
                          "bitmap": {
                              "type": "roaring"
                          },
                          "dimensionCompression": "lz4",
                          "stringDictionaryEncoding": {
                              "type": "utf8"
                          },
                          "metricCompression": "lz4",
                          "longEncoding": "longs"
                      },
                      "indexSpecForIntermediatePersists": {
                          "bitmap": {
                              "type": "roaring"
                          },
                          "dimensionCompression": "lz4",
                          "stringDictionaryEncoding": {
                              "type": "utf8"
                          },
                          "metricCompression": "lz4",
                          "longEncoding": "longs"
                      },
                      "reportParseExceptions": false,
                      "handoffConditionTimeout": 0,
                      "resetOffsetAutomatically": false,
                      "segmentWriteOutMediumFactory": null,
                      "workerThreads": null,
                      "chatRetries": 8,
                      "httpTimeout": "PT10S",
                      "shutdownTimeout": "PT80S",
                      "offsetFetchPeriod": "PT30S",
                      "intermediateHandoffPeriod": "P2147483647D",
                      "logParseExceptions": false,
                      "maxParseExceptions": 2147483647,
                      "maxSavedParseExceptions": 0,
                      "skipSequenceNumberAvailabilityCheck": false,
                      "repartitionTransitionDuration": "PT120S"
                  }
              },
              "dataSchema": {
                  "dataSource": "social_media",
                  "timestampSpec": {
                      "column": "__time",
                      "format": "iso",
                      "missingValue": null
                  },
                  "dimensionsSpec": {
                      "dimensions": [
                          {
                              "type": "string",
                              "name": "username",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "string",
                              "name": "post_title",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "long",
                              "name": "views",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "upvotes",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "comments",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "string",
                              "name": "edited",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          }
                      ],
                      "dimensionExclusions": [
                          "__time"
                      ],
                      "includeAllDimensions": false,
                      "useSchemaDiscovery": false
                  },
                  "metricsSpec": [],
                  "granularitySpec": {
                      "type": "uniform",
                      "segmentGranularity": "HOUR",
                      "queryGranularity": {
                          "type": "none"
                      },
                      "rollup": false,
                      "intervals": []
                  },
                  "transformSpec": {
                      "filter": null,
                      "transforms": []
                  }
              },
              "tuningConfig": {
                  "type": "kafka",
                  "appendableIndexSpec": {
                      "type": "onheap",
                      "preserveExistingMetrics": false
                  },
                  "maxRowsInMemory": 150000,
                  "maxBytesInMemory": 0,
                  "skipBytesInMemoryOverheadCheck": false,
                  "maxRowsPerSegment": 5000000,
                  "maxTotalRows": null,
                  "intermediatePersistPeriod": "PT10M",
                  "maxPendingPersists": 0,
                  "indexSpec": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "indexSpecForIntermediatePersists": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "reportParseExceptions": false,
                  "handoffConditionTimeout": 0,
                  "resetOffsetAutomatically": false,
                  "segmentWriteOutMediumFactory": null,
                  "workerThreads": null,
                  "chatRetries": 8,
                  "httpTimeout": "PT10S",
                  "shutdownTimeout": "PT80S",
                  "offsetFetchPeriod": "PT30S",
                  "intermediateHandoffPeriod": "P2147483647D",
                  "logParseExceptions": false,
                  "maxParseExceptions": 2147483647,
                  "maxSavedParseExceptions": 0,
                  "skipSequenceNumberAvailabilityCheck": false,
                  "repartitionTransitionDuration": "PT120S"
              },
              "ioConfig": {
                  "topic": "social_media",
                  "inputFormat": {
                      "type": "json",
                      "keepNullColumns": false,
                      "assumeNewlineDelimited": false,
                      "useJsonNodeReader": false
                  },
                  "replicas": 1,
                  "taskCount": 1,
                  "taskDuration": "PT3600S",
                  "consumerProperties": {
                      "bootstrap.servers": "localhost:9094"
                  },
                  "autoScalerConfig": null,
                  "pollTimeout": 100,
                  "startDelay": "PT5S",
                  "period": "PT30S",
                  "useEarliestOffset": true,
                  "completionTimeout": "PT1800S",
                  "lateMessageRejectionPeriod": null,
                  "earlyMessageRejectionPeriod": null,
                  "lateMessageRejectionStartDateTime": null,
                  "configOverrides": null,
                  "idleConfig": null,
                  "stream": "social_media",
                  "useEarliestSequenceNumber": true
              },
              "context": null,
              "suspended": false
          },
          "version": "2023-07-03T18:51:02.970Z"
      }
  ]
}

Get audit history for a specific supervisor

Retrieves an audit history of specs for a single supervisor.

URL

GET /druid/indexer/v1/supervisor/:supervisorId/history

Responses

200 SUCCESS
404 NOT FOUND

Successfully retrieved supervisor audit history

Invalid supervisor ID


Sample request

The following example shows how to retrieve the audit history of a supervisor with the name wikipedia_stream.

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/wikipedia_stream/history"
GET /druid/indexer/v1/supervisor/wikipedia_stream/history HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

[
  {
      "spec": {
          "type": "kafka",
          "spec": {
              "dataSchema": {
                  "dataSource": "wikipedia_stream",
                  "timestampSpec": {
                      "column": "__time",
                      "format": "iso",
                      "missingValue": null
                  },
                  "dimensionsSpec": {
                      "dimensions": [
                          {
                              "type": "string",
                              "name": "username",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "string",
                              "name": "post_title",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          },
                          {
                              "type": "long",
                              "name": "views",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "upvotes",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "long",
                              "name": "comments",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": false
                          },
                          {
                              "type": "string",
                              "name": "edited",
                              "multiValueHandling": "SORTED_ARRAY",
                              "createBitmapIndex": true
                          }
                      ],
                      "dimensionExclusions": [
                          "__time"
                      ],
                      "includeAllDimensions": false,
                      "useSchemaDiscovery": false
                  },
                  "metricsSpec": [],
                  "granularitySpec": {
                      "type": "uniform",
                      "segmentGranularity": "HOUR",
                      "queryGranularity": {
                          "type": "none"
                      },
                      "rollup": false,
                      "intervals": []
                  },
                  "transformSpec": {
                      "filter": null,
                      "transforms": []
                  }
              },
              "ioConfig": {
                  "topic": "social_media",
                  "inputFormat": {
                      "type": "json",
                      "keepNullColumns": false,
                      "assumeNewlineDelimited": false,
                      "useJsonNodeReader": false
                  },
                  "replicas": 1,
                  "taskCount": 1,
                  "taskDuration": "PT3600S",
                  "consumerProperties": {
                      "bootstrap.servers": "localhost:9042"
                  },
                  "autoScalerConfig": null,
                  "pollTimeout": 100,
                  "startDelay": "PT5S",
                  "period": "PT30S",
                  "useEarliestOffset": true,
                  "completionTimeout": "PT1800S",
                  "lateMessageRejectionPeriod": null,
                  "earlyMessageRejectionPeriod": null,
                  "lateMessageRejectionStartDateTime": null,
                  "configOverrides": null,
                  "idleConfig": null,
                  "stream": "social_media",
                  "useEarliestSequenceNumber": true
              },
              "tuningConfig": {
                  "type": "kafka",
                  "appendableIndexSpec": {
                      "type": "onheap",
                      "preserveExistingMetrics": false
                  },
                  "maxRowsInMemory": 150000,
                  "maxBytesInMemory": 0,
                  "skipBytesInMemoryOverheadCheck": false,
                  "maxRowsPerSegment": 5000000,
                  "maxTotalRows": null,
                  "intermediatePersistPeriod": "PT10M",
                  "maxPendingPersists": 0,
                  "indexSpec": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "indexSpecForIntermediatePersists": {
                      "bitmap": {
                          "type": "roaring"
                      },
                      "dimensionCompression": "lz4",
                      "stringDictionaryEncoding": {
                          "type": "utf8"
                      },
                      "metricCompression": "lz4",
                      "longEncoding": "longs"
                  },
                  "reportParseExceptions": false,
                  "handoffConditionTimeout": 0,
                  "resetOffsetAutomatically": false,
                  "segmentWriteOutMediumFactory": null,
                  "workerThreads": null,
                  "chatRetries": 8,
                  "httpTimeout": "PT10S",
                  "shutdownTimeout": "PT80S",
                  "offsetFetchPeriod": "PT30S",
                  "intermediateHandoffPeriod": "P2147483647D",
                  "logParseExceptions": false,
                  "maxParseExceptions": 2147483647,
                  "maxSavedParseExceptions": 0,
                  "skipSequenceNumberAvailabilityCheck": false,
                  "repartitionTransitionDuration": "PT120S"
              }
          },
          "dataSchema": {
              "dataSource": "wikipedia_stream",
              "timestampSpec": {
                  "column": "__time",
                  "format": "iso",
                  "missingValue": null
              },
              "dimensionsSpec": {
                  "dimensions": [
                      {
                          "type": "string",
                          "name": "username",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      },
                      {
                          "type": "string",
                          "name": "post_title",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      },
                      {
                          "type": "long",
                          "name": "views",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "long",
                          "name": "upvotes",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "long",
                          "name": "comments",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": false
                      },
                      {
                          "type": "string",
                          "name": "edited",
                          "multiValueHandling": "SORTED_ARRAY",
                          "createBitmapIndex": true
                      }
                  ],
                  "dimensionExclusions": [
                      "__time"
                  ],
                  "includeAllDimensions": false,
                  "useSchemaDiscovery": false
              },
              "metricsSpec": [],
              "granularitySpec": {
                  "type": "uniform",
                  "segmentGranularity": "HOUR",
                  "queryGranularity": {
                      "type": "none"
                  },
                  "rollup": false,
                  "intervals": []
              },
              "transformSpec": {
                  "filter": null,
                  "transforms": []
              }
          },
          "tuningConfig": {
              "type": "kafka",
              "appendableIndexSpec": {
                  "type": "onheap",
                  "preserveExistingMetrics": false
              },
              "maxRowsInMemory": 150000,
              "maxBytesInMemory": 0,
              "skipBytesInMemoryOverheadCheck": false,
              "maxRowsPerSegment": 5000000,
              "maxTotalRows": null,
              "intermediatePersistPeriod": "PT10M",
              "maxPendingPersists": 0,
              "indexSpec": {
                  "bitmap": {
                      "type": "roaring"
                  },
                  "dimensionCompression": "lz4",
                  "stringDictionaryEncoding": {
                      "type": "utf8"
                  },
                  "metricCompression": "lz4",
                  "longEncoding": "longs"
              },
              "indexSpecForIntermediatePersists": {
                  "bitmap": {
                      "type": "roaring"
                  },
                  "dimensionCompression": "lz4",
                  "stringDictionaryEncoding": {
                      "type": "utf8"
                  },
                  "metricCompression": "lz4",
                  "longEncoding": "longs"
              },
              "reportParseExceptions": false,
              "handoffConditionTimeout": 0,
              "resetOffsetAutomatically": false,
              "segmentWriteOutMediumFactory": null,
              "workerThreads": null,
              "chatRetries": 8,
              "httpTimeout": "PT10S",
              "shutdownTimeout": "PT80S",
              "offsetFetchPeriod": "PT30S",
              "intermediateHandoffPeriod": "P2147483647D",
              "logParseExceptions": false,
              "maxParseExceptions": 2147483647,
              "maxSavedParseExceptions": 0,
              "skipSequenceNumberAvailabilityCheck": false,
              "repartitionTransitionDuration": "PT120S"
          },
          "ioConfig": {
              "topic": "social_media",
              "inputFormat": {
                  "type": "json",
                  "keepNullColumns": false,
                  "assumeNewlineDelimited": false,
                  "useJsonNodeReader": false
              },
              "replicas": 1,
              "taskCount": 1,
              "taskDuration": "PT3600S",
              "consumerProperties": {
                  "bootstrap.servers": "localhost:9042"
              },
              "autoScalerConfig": null,
              "pollTimeout": 100,
              "startDelay": "PT5S",
              "period": "PT30S",
              "useEarliestOffset": true,
              "completionTimeout": "PT1800S",
              "lateMessageRejectionPeriod": null,
              "earlyMessageRejectionPeriod": null,
              "lateMessageRejectionStartDateTime": null,
              "configOverrides": null,
              "idleConfig": null,
              "stream": "social_media",
              "useEarliestSequenceNumber": true
          },
          "context": null,
          "suspended": false
      },
      "version": "2023-07-05T20:59:16.872Z"
  }
]

Manage supervisors

Create or update a supervisor

Creates a new supervisor or updates an existing one for the same datasource with a new schema and configuration.

You can define a supervisor spec for Apache Kafka or Amazon Kinesis streaming ingestion methods. Once created, the supervisor persists in the metadata database.

When you call this endpoint on an existing supervisor for the same datasource, the running supervisor signals its tasks to stop reading and begin publishing, exiting itself. Druid then uses the provided configuration from the request body to create a new supervisor. Druid submits a new schema while retaining existing publishing tasks and starts new tasks at the previous task offsets.

URL

POST /druid/indexer/v1/supervisor

Responses

200 SUCCESS
415 UNSUPPORTED MEDIA TYPE

Successfully created a new supervisor or updated an existing supervisor

Request body content type is not in JSON format


Sample request

The following example uses JSON input format to create a supervisor spec for Kafka with a social_media datasource and social_media topic.

cURL
HTTP
curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor" \
--header 'Content-Type: application/json' \
--data '{
"type": "kafka",
"spec": {
"ioConfig": {
"type": "kafka",
"consumerProperties": {
"bootstrap.servers": "localhost:9094"
},
"topic": "social_media",
"inputFormat": {
"type": "json"
},
"useEarliestOffset": true
},
"tuningConfig": {
"type": "kafka"
},
"dataSchema": {
"dataSource": "social_media",
"timestampSpec": {
"column": "__time",
"format": "iso"
},
"dimensionsSpec": {
"dimensions": [
"username",
"post_title",
{
"type": "long",
"name": "views"
},
{
"type": "long",
"name": "upvotes"
},
{
"type": "long",
"name": "comments"
},
"edited"
]
},
"granularitySpec": {
"queryGranularity": "none",
"rollup": false,
"segmentGranularity": "hour"
}
}
}
}'
POST /druid/indexer/v1/supervisor HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT
Content-Type: application/json
Content-Length: 1359

{
"type": "kafka",
"spec": {
"ioConfig": {
"type": "kafka",
"consumerProperties": {
"bootstrap.servers": "localhost:9094"
},
"topic": "social_media",
"inputFormat": {
"type": "json"
},
"useEarliestOffset": true
},
"tuningConfig": {
"type": "kafka"
},
"dataSchema": {
"dataSource": "social_media",
"timestampSpec": {
"column": "__time",
"format": "iso"
},
"dimensionsSpec": {
"dimensions": [
"username",
"post_title",
{
"type": "long",
"name": "views"
},
{
"type": "long",
"name": "upvotes"
},
{
"type": "long",
"name": "comments"
},
"edited"
]
},
"granularitySpec": {
"queryGranularity": "none",
"rollup": false,
"segmentGranularity": "hour"
}
}
}
}

Sample response

Click to show sample response

{
  "id": "social_media"
}

Suspend a running supervisor

Suspends a single running supervisor. Returns the updated supervisor spec, where the suspended property is set to true. The suspended supervisor continues to emit logs and metrics.

URL

POST /druid/indexer/v1/supervisor/:supervisorId/suspend

Responses

200 SUCCESS
400 BAD REQUEST
404 NOT FOUND

Successfully shut down supervisor

Supervisor already suspended

Invalid supervisor ID


Sample request

The following example shows how to suspend a running supervisor with the name social_media.

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/social_media/suspend"
POST /druid/indexer/v1/supervisor/social_media/suspend HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "type": "kafka",
  "spec": {
      "dataSchema": {
          "dataSource": "social_media",
          "timestampSpec": {
              "column": "__time",
              "format": "iso",
              "missingValue": null
          },
          "dimensionsSpec": {
              "dimensions": [
                  {
                      "type": "string",
                      "name": "username",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  },
                  {
                      "type": "string",
                      "name": "post_title",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  },
                  {
                      "type": "long",
                      "name": "views",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "long",
                      "name": "upvotes",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "long",
                      "name": "comments",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "string",
                      "name": "edited",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  }
              ],
              "dimensionExclusions": [
                  "__time"
              ],
              "includeAllDimensions": false,
              "useSchemaDiscovery": false
          },
          "metricsSpec": [],
          "granularitySpec": {
              "type": "uniform",
              "segmentGranularity": "HOUR",
              "queryGranularity": {
                  "type": "none"
              },
              "rollup": false,
              "intervals": []
          },
          "transformSpec": {
              "filter": null,
              "transforms": []
          }
      },
      "ioConfig": {
          "topic": "social_media",
          "inputFormat": {
              "type": "json",
              "keepNullColumns": false,
              "assumeNewlineDelimited": false,
              "useJsonNodeReader": false
          },
          "replicas": 1,
          "taskCount": 1,
          "taskDuration": "PT3600S",
          "consumerProperties": {
              "bootstrap.servers": "localhost:9094"
          },
          "autoScalerConfig": null,
          "pollTimeout": 100,
          "startDelay": "PT5S",
          "period": "PT30S",
          "useEarliestOffset": true,
          "completionTimeout": "PT1800S",
          "lateMessageRejectionPeriod": null,
          "earlyMessageRejectionPeriod": null,
          "lateMessageRejectionStartDateTime": null,
          "configOverrides": null,
          "idleConfig": null,
          "stream": "social_media",
          "useEarliestSequenceNumber": true
      },
      "tuningConfig": {
          "type": "kafka",
          "appendableIndexSpec": {
              "type": "onheap",
              "preserveExistingMetrics": false
          },
          "maxRowsInMemory": 150000,
          "maxBytesInMemory": 0,
          "skipBytesInMemoryOverheadCheck": false,
          "maxRowsPerSegment": 5000000,
          "maxTotalRows": null,
          "intermediatePersistPeriod": "PT10M",
          "maxPendingPersists": 0,
          "indexSpec": {
              "bitmap": {
                  "type": "roaring"
              },
              "dimensionCompression": "lz4",
              "stringDictionaryEncoding": {
                  "type": "utf8"
              },
              "metricCompression": "lz4",
              "longEncoding": "longs"
          },
          "indexSpecForIntermediatePersists": {
              "bitmap": {
                  "type": "roaring"
              },
              "dimensionCompression": "lz4",
              "stringDictionaryEncoding": {
                  "type": "utf8"
              },
              "metricCompression": "lz4",
              "longEncoding": "longs"
          },
          "reportParseExceptions": false,
          "handoffConditionTimeout": 0,
          "resetOffsetAutomatically": false,
          "segmentWriteOutMediumFactory": null,
          "workerThreads": null,
          "chatRetries": 8,
          "httpTimeout": "PT10S",
          "shutdownTimeout": "PT80S",
          "offsetFetchPeriod": "PT30S",
          "intermediateHandoffPeriod": "P2147483647D",
          "logParseExceptions": false,
          "maxParseExceptions": 2147483647,
          "maxSavedParseExceptions": 0,
          "skipSequenceNumberAvailabilityCheck": false,
          "repartitionTransitionDuration": "PT120S"
      }
  },
  "dataSchema": {
      "dataSource": "social_media",
      "timestampSpec": {
          "column": "__time",
          "format": "iso",
          "missingValue": null
      },
      "dimensionsSpec": {
          "dimensions": [
              {
                  "type": "string",
                  "name": "username",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              },
              {
                  "type": "string",
                  "name": "post_title",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              },
              {
                  "type": "long",
                  "name": "views",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "long",
                  "name": "upvotes",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "long",
                  "name": "comments",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "string",
                  "name": "edited",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              }
          ],
          "dimensionExclusions": [
              "__time"
          ],
          "includeAllDimensions": false,
          "useSchemaDiscovery": false
      },
      "metricsSpec": [],
      "granularitySpec": {
          "type": "uniform",
          "segmentGranularity": "HOUR",
          "queryGranularity": {
              "type": "none"
          },
          "rollup": false,
          "intervals": []
      },
      "transformSpec": {
          "filter": null,
          "transforms": []
      }
  },
  "tuningConfig": {
      "type": "kafka",
      "appendableIndexSpec": {
          "type": "onheap",
          "preserveExistingMetrics": false
      },
      "maxRowsInMemory": 150000,
      "maxBytesInMemory": 0,
      "skipBytesInMemoryOverheadCheck": false,
      "maxRowsPerSegment": 5000000,
      "maxTotalRows": null,
      "intermediatePersistPeriod": "PT10M",
      "maxPendingPersists": 0,
      "indexSpec": {
          "bitmap": {
              "type": "roaring"
          },
          "dimensionCompression": "lz4",
          "stringDictionaryEncoding": {
              "type": "utf8"
          },
          "metricCompression": "lz4",
          "longEncoding": "longs"
      },
      "indexSpecForIntermediatePersists": {
          "bitmap": {
              "type": "roaring"
          },
          "dimensionCompression": "lz4",
          "stringDictionaryEncoding": {
              "type": "utf8"
          },
          "metricCompression": "lz4",
          "longEncoding": "longs"
      },
      "reportParseExceptions": false,
      "handoffConditionTimeout": 0,
      "resetOffsetAutomatically": false,
      "segmentWriteOutMediumFactory": null,
      "workerThreads": null,
      "chatRetries": 8,
      "httpTimeout": "PT10S",
      "shutdownTimeout": "PT80S",
      "offsetFetchPeriod": "PT30S",
      "intermediateHandoffPeriod": "P2147483647D",
      "logParseExceptions": false,
      "maxParseExceptions": 2147483647,
      "maxSavedParseExceptions": 0,
      "skipSequenceNumberAvailabilityCheck": false,
      "repartitionTransitionDuration": "PT120S"
  },
  "ioConfig": {
      "topic": "social_media",
      "inputFormat": {
          "type": "json",
          "keepNullColumns": false,
          "assumeNewlineDelimited": false,
          "useJsonNodeReader": false
      },
      "replicas": 1,
      "taskCount": 1,
      "taskDuration": "PT3600S",
      "consumerProperties": {
          "bootstrap.servers": "localhost:9094"
      },
      "autoScalerConfig": null,
      "pollTimeout": 100,
      "startDelay": "PT5S",
      "period": "PT30S",
      "useEarliestOffset": true,
      "completionTimeout": "PT1800S",
      "lateMessageRejectionPeriod": null,
      "earlyMessageRejectionPeriod": null,
      "lateMessageRejectionStartDateTime": null,
      "configOverrides": null,
      "idleConfig": null,
      "stream": "social_media",
      "useEarliestSequenceNumber": true
  },
  "context": null,
  "suspended": true
}

Suspend all supervisors

Suspends all supervisors. Note that this endpoint returns an HTTP 200 Success code message even if there are no supervisors or running supervisors to suspend.

URL

POST /druid/indexer/v1/supervisor/suspendAll

Responses

200 SUCCESS

Successfully suspended all supervisors


Sample request

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/suspendAll"
POST /druid/indexer/v1/supervisor/suspendAll HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "status": "success"
}

Resume a supervisor

Resumes indexing tasks for a supervisor. Returns an updated supervisor spec with the suspended property set to false.

URL

POST /druid/indexer/v1/supervisor/:supervisorId/resume

Responses

200 SUCCESS
400 BAD REQUEST
404 NOT FOUND

Successfully resumed supervisor

Supervisor already running

Invalid supervisor ID


Sample request

The following example resumes a previously suspended supervisor with name social_media.

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/social_media/resume"
POST /druid/indexer/v1/supervisor/social_media/resume HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "type": "kafka",
  "spec": {
      "dataSchema": {
          "dataSource": "social_media",
          "timestampSpec": {
              "column": "__time",
              "format": "iso",
              "missingValue": null
          },
          "dimensionsSpec": {
              "dimensions": [
                  {
                      "type": "string",
                      "name": "username",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  },
                  {
                      "type": "string",
                      "name": "post_title",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  },
                  {
                      "type": "long",
                      "name": "views",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "long",
                      "name": "upvotes",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "long",
                      "name": "comments",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": false
                  },
                  {
                      "type": "string",
                      "name": "edited",
                      "multiValueHandling": "SORTED_ARRAY",
                      "createBitmapIndex": true
                  }
              ],
              "dimensionExclusions": [
                  "__time"
              ],
              "includeAllDimensions": false,
              "useSchemaDiscovery": false
          },
          "metricsSpec": [],
          "granularitySpec": {
              "type": "uniform",
              "segmentGranularity": "HOUR",
              "queryGranularity": {
                  "type": "none"
              },
              "rollup": false,
              "intervals": []
          },
          "transformSpec": {
              "filter": null,
              "transforms": []
          }
      },
      "ioConfig": {
          "topic": "social_media",
          "inputFormat": {
              "type": "json",
              "keepNullColumns": false,
              "assumeNewlineDelimited": false,
              "useJsonNodeReader": false
          },
          "replicas": 1,
          "taskCount": 1,
          "taskDuration": "PT3600S",
          "consumerProperties": {
              "bootstrap.servers": "localhost:9094"
          },
          "autoScalerConfig": null,
          "pollTimeout": 100,
          "startDelay": "PT5S",
          "period": "PT30S",
          "useEarliestOffset": true,
          "completionTimeout": "PT1800S",
          "lateMessageRejectionPeriod": null,
          "earlyMessageRejectionPeriod": null,
          "lateMessageRejectionStartDateTime": null,
          "configOverrides": null,
          "idleConfig": null,
          "stream": "social_media",
          "useEarliestSequenceNumber": true
      },
      "tuningConfig": {
          "type": "kafka",
          "appendableIndexSpec": {
              "type": "onheap",
              "preserveExistingMetrics": false
          },
          "maxRowsInMemory": 150000,
          "maxBytesInMemory": 0,
          "skipBytesInMemoryOverheadCheck": false,
          "maxRowsPerSegment": 5000000,
          "maxTotalRows": null,
          "intermediatePersistPeriod": "PT10M",
          "maxPendingPersists": 0,
          "indexSpec": {
              "bitmap": {
                  "type": "roaring"
              },
              "dimensionCompression": "lz4",
              "stringDictionaryEncoding": {
                  "type": "utf8"
              },
              "metricCompression": "lz4",
              "longEncoding": "longs"
          },
          "indexSpecForIntermediatePersists": {
              "bitmap": {
                  "type": "roaring"
              },
              "dimensionCompression": "lz4",
              "stringDictionaryEncoding": {
                  "type": "utf8"
              },
              "metricCompression": "lz4",
              "longEncoding": "longs"
          },
          "reportParseExceptions": false,
          "handoffConditionTimeout": 0,
          "resetOffsetAutomatically": false,
          "segmentWriteOutMediumFactory": null,
          "workerThreads": null,
          "chatRetries": 8,
          "httpTimeout": "PT10S",
          "shutdownTimeout": "PT80S",
          "offsetFetchPeriod": "PT30S",
          "intermediateHandoffPeriod": "P2147483647D",
          "logParseExceptions": false,
          "maxParseExceptions": 2147483647,
          "maxSavedParseExceptions": 0,
          "skipSequenceNumberAvailabilityCheck": false,
          "repartitionTransitionDuration": "PT120S"
      }
  },
  "dataSchema": {
      "dataSource": "social_media",
      "timestampSpec": {
          "column": "__time",
          "format": "iso",
          "missingValue": null
      },
      "dimensionsSpec": {
          "dimensions": [
              {
                  "type": "string",
                  "name": "username",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              },
              {
                  "type": "string",
                  "name": "post_title",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              },
              {
                  "type": "long",
                  "name": "views",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "long",
                  "name": "upvotes",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "long",
                  "name": "comments",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": false
              },
              {
                  "type": "string",
                  "name": "edited",
                  "multiValueHandling": "SORTED_ARRAY",
                  "createBitmapIndex": true
              }
          ],
          "dimensionExclusions": [
              "__time"
          ],
          "includeAllDimensions": false,
          "useSchemaDiscovery": false
      },
      "metricsSpec": [],
      "granularitySpec": {
          "type": "uniform",
          "segmentGranularity": "HOUR",
          "queryGranularity": {
              "type": "none"
          },
          "rollup": false,
          "intervals": []
      },
      "transformSpec": {
          "filter": null,
          "transforms": []
      }
  },
  "tuningConfig": {
      "type": "kafka",
      "appendableIndexSpec": {
          "type": "onheap",
          "preserveExistingMetrics": false
      },
      "maxRowsInMemory": 150000,
      "maxBytesInMemory": 0,
      "skipBytesInMemoryOverheadCheck": false,
      "maxRowsPerSegment": 5000000,
      "maxTotalRows": null,
      "intermediatePersistPeriod": "PT10M",
      "maxPendingPersists": 0,
      "indexSpec": {
          "bitmap": {
              "type": "roaring"
          },
          "dimensionCompression": "lz4",
          "stringDictionaryEncoding": {
              "type": "utf8"
          },
          "metricCompression": "lz4",
          "longEncoding": "longs"
      },
      "indexSpecForIntermediatePersists": {
          "bitmap": {
              "type": "roaring"
          },
          "dimensionCompression": "lz4",
          "stringDictionaryEncoding": {
              "type": "utf8"
          },
          "metricCompression": "lz4",
          "longEncoding": "longs"
      },
      "reportParseExceptions": false,
      "handoffConditionTimeout": 0,
      "resetOffsetAutomatically": false,
      "segmentWriteOutMediumFactory": null,
      "workerThreads": null,
      "chatRetries": 8,
      "httpTimeout": "PT10S",
      "shutdownTimeout": "PT80S",
      "offsetFetchPeriod": "PT30S",
      "intermediateHandoffPeriod": "P2147483647D",
      "logParseExceptions": false,
      "maxParseExceptions": 2147483647,
      "maxSavedParseExceptions": 0,
      "skipSequenceNumberAvailabilityCheck": false,
      "repartitionTransitionDuration": "PT120S"
  },
  "ioConfig": {
      "topic": "social_media",
      "inputFormat": {
          "type": "json",
          "keepNullColumns": false,
          "assumeNewlineDelimited": false,
          "useJsonNodeReader": false
      },
      "replicas": 1,
      "taskCount": 1,
      "taskDuration": "PT3600S",
      "consumerProperties": {
          "bootstrap.servers": "localhost:9094"
      },
      "autoScalerConfig": null,
      "pollTimeout": 100,
      "startDelay": "PT5S",
      "period": "PT30S",
      "useEarliestOffset": true,
      "completionTimeout": "PT1800S",
      "lateMessageRejectionPeriod": null,
      "earlyMessageRejectionPeriod": null,
      "lateMessageRejectionStartDateTime": null,
      "configOverrides": null,
      "idleConfig": null,
      "stream": "social_media",
      "useEarliestSequenceNumber": true
  },
  "context": null,
  "suspended": false
}

Resume all supervisors

Resumes all supervisors. Note that this endpoint returns an HTTP 200 Success code even if there are no supervisors or suspended supervisors to resume.

URL

POST /druid/indexer/v1/supervisor/resumeAll

Responses

200 SUCCESS

Successfully resumed all supervisors


Sample request

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/resumeAll"
POST /druid/indexer/v1/supervisor/resumeAll HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "status": "success"
}

Reset a supervisor

Resets the specified supervisor. This endpoint clears stored offsets in Kafka or sequence numbers in Kinesis, prompting the supervisor to resume data reading. The supervisor will start from the earliest or latest available position, depending on the platform (offsets in Kafka or sequence numbers in Kinesis). It kills and recreates active tasks to read from valid positions.

Use this endpoint to recover from a stopped state due to missing offsets in Kafka or sequence numbers in Kinesis. Use this endpoint with caution as it may result in skipped messages and lead to data loss or duplicate data.

URL

POST /druid/indexer/v1/supervisor/:supervisorId/reset

Responses

200 SUCCESS
404 NOT FOUND

Successfully reset supervisor

Invalid supervisor ID


Sample request

The following example shows how to reset a supervisor with the name social_media.

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/social_media/reset"
POST /druid/indexer/v1/supervisor/social_media/reset HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "id": "social_media"
}

Terminate a supervisor

Terminates a supervisor and its associated indexing tasks, triggering the publishing of their segments. When terminated, a tombstone marker is placed in the database to prevent reloading on restart.

The terminated supervisor still exists in the metadata store and its history can be retrieved.

URL

POST /druid/indexer/v1/supervisor/:supervisorId/terminate

Responses

200 SUCCESS
404 NOT FOUND

Successfully terminated a supervisor

Invalid supervisor ID or supervisor not running


Sample request

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/social_media/terminate"
POST /druid/indexer/v1/supervisor/social_media/terminate HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "id": "social_media"
}

Terminate all supervisors

Terminates all supervisors. Terminated supervisors still exist in the metadata store and their history can be retrieved. Note that this endpoint returns an HTTP 200 Success code even if there are no supervisors or running supervisors to terminate.

URL

POST /druid/indexer/v1/supervisor/terminateAll

Responses

200 SUCCESS

Successfully terminated all supervisors


Sample request

cURL
HTTP
curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/terminateAll"
POST /druid/indexer/v1/supervisor/terminateAll HTTP/1.1
Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

{
  "status": "success"
}

Shut down a supervisor

Shuts down a supervisor. This endpoint is deprecated and will be removed in future releases. Use the equivalent terminate endpoint instead.

URL

POST /druid/indexer/v1/supervisor/:supervisorId/shutdown

← TasksRetention rules →
  • Supervisor information
    • Get an array of active supervisor IDs
    • Get an array of active supervisor objects
    • Get an array of supervisor states
    • Get supervisor specification
    • Get supervisor status
  • Audit history
    • Get audit history for all supervisors
    • Get audit history for a specific supervisor
  • Manage supervisors
    • Create or update a supervisor
    • Suspend a running supervisor
    • Suspend all supervisors
    • Resume a supervisor
    • Resume all supervisors
    • Reset a supervisor
    • Terminate a supervisor
    • Terminate all supervisors
    • Shut down a supervisor

Technology · Use Cases · Powered by Druid · Docs · Community · Download · FAQ

 ·  ·  · 
Copyright © 2022 Apache Software Foundation.
Except where otherwise noted, licensed under CC BY-SA 4.0.
Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.