Skip to content

Instantly share code, notes, and snippets.

@rajkrrsingh
Created July 2, 2018 21:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rajkrrsingh/fcebb25910a98ed10ac3471f80b65b51 to your computer and use it in GitHub Desktop.
Druid Supervisor REST API

Supervisor REST API

Get Supervisor Spec

curl    http://host215-node2:8090/druid/indexer/v1/supervisor/metrics-kafka
{"type":"kafka","dataSchema":{"dataSource":"metrics-kafka","parser":{"type":"string","parseSpec":{"format":"json","timestampSpec":{"column":"timestamp","format":"auto"},"dimensionsSpec":{"dimensions":[],"dimensionExclusions":["timestamp","value"]}}},"metricsSpec":[{"type":"count","name":"count"},{"type":"doubleSum","name":"value_sum","fieldName":"value","expression":null},{"type":"doubleMin","name":"value_min","fieldName":"value","expression":null},{"type":"doubleMax","name":"value_max","fieldName":"value","expression":null}],"granularitySpec":{"type":"uniform","segmentGranularity":"HOUR","queryGranularity":{"type":"none"},"rollup":true,"intervals":null}},"tuningConfig":{"type":"kafka","maxRowsInMemory":75000,"maxRowsPerSegment":5000000,"intermediatePersistPeriod":"PT10M","basePersistDirectory":"/tmp/1530551810169-0","maxPendingPersists":0,"indexSpec":{"bitmap":{"type":"concise"},"dimensionCompression":"lz4","metricCompression":"lz4","longEncoding":"longs"},"buildV9Directly":true,"reportParseExceptions":false,"handoffConditionTimeout":0,"resetOffsetAutomatically":false,"workerThreads":null,"chatThreads":null,"chatRetries":8,"httpTimeout":"PT10S","shutdownTimeout":"PT80S","offsetFetchPeriod":"PT30S"},"ioConfig":{"topic":"metrics","replicas":1,"taskCount":1,"taskDuration":"PT3600S","consumerProperties":{"bootstrap.servers":"host215-node2:6667"},"startDelay":"PT5S","period":"PT30S","useEarliestOffset":false,"completionTimeout":"PT1800S","lateMessageRejectionPeriod":null,"skipOffsetGaps":false},"context":null}

Get Supervisor Status Report

curl    http://host215-node2:8090/druid/indexer/v1/supervisor/metrics-kafka/status
{"id":"metrics-kafka","generationTime":"2018-07-02T17:22:11.033Z","payload":{"dataSource":"metrics-kafka","topic":"metrics","partitions":0,"replicas":1,"durationSeconds":3600,"activeTasks":[],"publishingTasks":[],"minimumLag":{},"aggregateLag":0,"offsetsLastUpdated":null}}

Get All Supervisor History

{"metrics-kafka":[{"spec":{"type":"kafka","dataSchema":{"dataSource":"metrics-kafka","parser":{"type":"string","parseSpec":{"format":"json","timestampSpec":{"column":"timestamp","format":"auto"},"dimensionsSpec":{"dimensions":[],"dimensionExclusions":["timestamp","value"]}}},"metricsSpec":[{"type":"count","name":"count"},{"type":"doubleSum","name":"value_sum","fieldName":"value","expression":null},{"type":"doubleMin","name":"value_min","fieldName":"value","expression":null},{"type":"doubleMax","name":"value_max","fieldName":"value","expression":null}],"granularitySpec":{"type":"uniform","segmentGranularity":"HOUR","queryGranularity":{"type":"none"},"rollup":true,"intervals":null}},"tuningConfig":{"type":"kafka","maxRowsInMemory":75000,"maxRowsPerSegment":5000000,"intermediatePersistPeriod":"PT10M","basePersistDirectory":"/tmp/1530551810169-0","maxPendingPersists":0,"indexSpec":{"bitmap":{"type":"concise"},"dimensionCompression":"lz4","metricCompression":"lz4","longEncoding":"longs"},"buildV9Directly":true,"reportParseExceptions":false,"handoffConditionTimeout":0,"resetOffsetAutomatically":false,"workerThreads":null,"chatThreads":null,"chatRetries":8,"httpTimeout":"PT10S","shutdownTimeout":"PT80S","offsetFetchPeriod":"PT30S"},"ioConfig":{"topic":"metrics","replicas":1,"taskCount":1,"taskDuration":"PT3600S","consumerProperties":{"bootstrap.servers":"host215-node2:6667"},"startDelay":"PT5S","period":"PT30S","useEarliestOffset":false,"completionTimeout":"PT1800S","lateMessageRejectionPeriod":null,"skipOffsetGaps":false},"context":null},"version":"2018-07-02T17:16:50.172Z"}]}

Get Supervisor History

curl    http://host215-node2:8090/druid/indexer/v1/supervisor/metrics-kafka/history
[{"spec":{"type":"kafka","dataSchema":{"dataSource":"metrics-kafka","parser":{"type":"string","parseSpec":{"format":"json","timestampSpec":{"column":"timestamp","format":"auto"},"dimensionsSpec":{"dimensions":[],"dimensionExclusions":["timestamp","value"]}}},"metricsSpec":[{"type":"count","name":"count"},{"type":"doubleSum","name":"value_sum","fieldName":"value","expression":null},{"type":"doubleMin","name":"value_min","fieldName":"value","expression":null},{"type":"doubleMax","name":"value_max","fieldName":"value","expression":null}],"granularitySpec":{"type":"uniform","segmentGranularity":"HOUR","queryGranularity":{"type":"none"},"rollup":true,"intervals":null}},"tuningConfig":{"type":"kafka","maxRowsInMemory":75000,"maxRowsPerSegment":5000000,"intermediatePersistPeriod":"PT10M","basePersistDirectory":"/tmp/1530551810169-0","maxPendingPersists":0,"indexSpec":{"bitmap":{"type":"concise"},"dimensionCompression":"lz4","metricCompression":"lz4","longEncoding":"longs"},"buildV9Directly":true,"reportParseExceptions":false,"handoffConditionTimeout":0,"resetOffsetAutomatically":false,"workerThreads":null,"chatThreads":null,"chatRetries":8,"httpTimeout":"PT10S","shutdownTimeout":"PT80S","offsetFetchPeriod":"PT30S"},"ioConfig":{"topic":"metrics","replicas":1,"taskCount":1,"taskDuration":"PT3600S","consumerProperties":{"bootstrap.servers":"host215-node2:6667"},"startDelay":"PT5S","period":"PT30S","useEarliestOffset":false,"completionTimeout":"PT1800S","lateMessageRejectionPeriod":null,"skipOffsetGaps":false},"context":null},"version":"2018-07-02T17:16:50.172Z"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment