You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by kf...@apache.org on 2026/10/01 14:56:04 UTC
(druid-website-src) 01/01: Update website for Druid 38.0.0 release
This is an automated email from the ASF dual-hosted git repository.
kfaraz pushed a commit to branch 38.0.0
in repository https://gitbox.apache.org/repos/asf/druid-website-src.git
commit 975fe122603524a997a4861e6b34fa724e018be2
Author: Kashif Faraz <ka...@gmail.com>
AuthorDate: Thu Oct 1 20:25:31 2026 +0530
Update website for Druid 38.0.0 release
---
.../api-reference/api-reference.md | 2 +-
.../api-reference/automatic-compaction-api.md | 2 +-
.../api-reference/data-management-api.md | 2 +-
.../api-reference/dynamic-configuration-api.md | 42 +-
.../api-reference/json-querying-api.md | 2 +-
.../api-reference/legacy-metadata-api.md | 2 +-
.../api-reference/lookups-api.md | 2 +-
.../api-reference/retention-rules-api.md | 2 +-
.../api-reference/service-status-api.md | 35 +-
docs/{latest => 38.0.0}/api-reference/sql-api.md | 2 +-
.../api-reference/sql-ingestion-api.md | 11 +-
docs/{latest => 38.0.0}/api-reference/sql-jdbc.md | 2 +-
.../api-reference/supervisor-api.md | 114 +++-
docs/{latest => 38.0.0}/api-reference/tasks-api.md | 3 +-
docs/38.0.0/assets/compaction-config.png | Bin 0 -> 103224 bytes
docs/38.0.0/assets/datasources-action-button.png | Bin 0 -> 800 bytes
docs/38.0.0/assets/druid-architecture.png | Bin 0 -> 134117 bytes
docs/38.0.0/assets/druid-architecture.svg | 19 +
docs/38.0.0/assets/druid-column-types.png | Bin 0 -> 93363 bytes
docs/38.0.0/assets/druid-dataflow-2x.png | Bin 0 -> 130160 bytes
docs/38.0.0/assets/druid-dataflow-3.png | Bin 0 -> 71425 bytes
docs/38.0.0/assets/druid-manage-1.png | Bin 0 -> 80415 bytes
docs/38.0.0/assets/druid-timeline.png | Bin 0 -> 24160 bytes
.../38.0.0/assets/files/kttm-kafka-supervisor.json | 66 ++
docs/38.0.0/assets/indexing_service.png | Bin 0 -> 22490 bytes
.../msq-ui-download-query-results.png | Bin 0 -> 62538 bytes
.../multi-stage-query/tutorial-msq-convert.png | Bin 0 -> 80379 bytes
.../assets/multi-stage-query/ui-annotated.png | Bin 0 -> 227968 bytes
docs/38.0.0/assets/multi-stage-query/ui-empty.png | Bin 0 -> 77306 bytes
docs/38.0.0/assets/native-queries-01.png | Bin 0 -> 259507 bytes
docs/38.0.0/assets/nested-combined-json.png | Bin 0 -> 272858 bytes
docs/38.0.0/assets/nested-display-data-types.png | Bin 0 -> 254224 bytes
docs/38.0.0/assets/nested-examine-schema.png | Bin 0 -> 251706 bytes
docs/38.0.0/assets/nested-extract-as-type.png | Bin 0 -> 288918 bytes
docs/38.0.0/assets/nested-extract-elements.png | Bin 0 -> 317905 bytes
docs/38.0.0/assets/nested-group-aggregate.png | Bin 0 -> 249178 bytes
.../assets/nested-msq-ingestion-transform.png | Bin 0 -> 370419 bytes
docs/38.0.0/assets/nested-msq-ingestion.png | Bin 0 -> 302033 bytes
docs/38.0.0/assets/nested-parse-deserialize.png | Bin 0 -> 213791 bytes
docs/38.0.0/assets/nested-retrieve-json.png | Bin 0 -> 295566 bytes
docs/38.0.0/assets/nested-return-json.png | Bin 0 -> 349144 bytes
docs/38.0.0/assets/retention-rules.png | Bin 0 -> 148273 bytes
docs/38.0.0/assets/security-model-1.png | Bin 0 -> 85098 bytes
docs/38.0.0/assets/security-model-2.png | Bin 0 -> 29613 bytes
docs/38.0.0/assets/segmentPropagation.png | Bin 0 -> 30569 bytes
docs/38.0.0/assets/services-overview.png | Bin 0 -> 112702 bytes
.../assets/set-query-context-insert-query.png | Bin 0 -> 51618 bytes
.../set-query-context-open-context-dialog.png | Bin 0 -> 75005 bytes
.../38.0.0/assets/set-query-context-query-view.png | Bin 0 -> 66028 bytes
.../assets/set-query-context-run-the-query.png | Bin 0 -> 50538 bytes
.../set-query-context-set-context-parameters.png | Bin 0 -> 54655 bytes
.../assets/spectator-histogram-size-comparison.png | Bin 0 -> 45331 bytes
docs/38.0.0/assets/supervisor-actions.png | Bin 0 -> 77894 bytes
docs/38.0.0/assets/supervisor-info-dialog.png | Bin 0 -> 107805 bytes
docs/38.0.0/assets/supervisor-view.png | Bin 0 -> 63532 bytes
.../assets/tutorial-batch-data-loader-00.png | Bin 0 -> 2904 bytes
.../assets/tutorial-batch-data-loader-01.png | Bin 0 -> 227941 bytes
.../assets/tutorial-batch-data-loader-015.png | Bin 0 -> 206331 bytes
.../assets/tutorial-batch-data-loader-02.png | Bin 0 -> 1193472 bytes
.../assets/tutorial-batch-data-loader-03.png | Bin 0 -> 405035 bytes
.../assets/tutorial-batch-data-loader-04.png | Bin 0 -> 488906 bytes
.../assets/tutorial-batch-data-loader-05.png | Bin 0 -> 447046 bytes
.../assets/tutorial-batch-data-loader-06.png | Bin 0 -> 191383 bytes
.../assets/tutorial-batch-data-loader-07.png | Bin 0 -> 173618 bytes
.../assets/tutorial-batch-data-loader-08.png | Bin 0 -> 325806 bytes
.../assets/tutorial-batch-data-loader-09.png | Bin 0 -> 187695 bytes
.../assets/tutorial-batch-data-loader-10.png | Bin 0 -> 219732 bytes
.../assets/tutorial-batch-data-loader-11.png | Bin 0 -> 316540 bytes
.../assets/tutorial-batch-data-loader-12.png | Bin 0 -> 31752 bytes
.../assets/tutorial-batch-submit-task-01.png | Bin 0 -> 170537 bytes
.../assets/tutorial-batch-submit-task-02.png | Bin 0 -> 207377 bytes
docs/38.0.0/assets/tutorial-compaction-01.png | Bin 0 -> 35710 bytes
docs/38.0.0/assets/tutorial-compaction-02.png | Bin 0 -> 166571 bytes
docs/38.0.0/assets/tutorial-compaction-03.png | Bin 0 -> 26755 bytes
docs/38.0.0/assets/tutorial-compaction-04.png | Bin 0 -> 184365 bytes
docs/38.0.0/assets/tutorial-compaction-05.png | Bin 0 -> 26588 bytes
docs/38.0.0/assets/tutorial-compaction-06.png | Bin 0 -> 206717 bytes
docs/38.0.0/assets/tutorial-compaction-07.png | Bin 0 -> 26683 bytes
docs/38.0.0/assets/tutorial-compaction-08.png | Bin 0 -> 28751 bytes
docs/38.0.0/assets/tutorial-deletion-01.png | Bin 0 -> 163245 bytes
docs/38.0.0/assets/tutorial-deletion-02.png | Bin 0 -> 159346 bytes
docs/38.0.0/assets/tutorial-deletion-03.png | Bin 0 -> 153770 bytes
.../assets/tutorial-kafka-data-loader-01.png | Bin 0 -> 75787 bytes
.../assets/tutorial-kafka-data-loader-02.png | Bin 0 -> 420744 bytes
.../assets/tutorial-kafka-data-loader-03.png | Bin 0 -> 192051 bytes
.../assets/tutorial-kafka-data-loader-04.png | Bin 0 -> 244021 bytes
.../assets/tutorial-kafka-data-loader-05.png | Bin 0 -> 506701 bytes
.../assets/tutorial-kafka-data-loader-06.png | Bin 0 -> 95274 bytes
.../assets/tutorial-kafka-data-loader-07.png | Bin 0 -> 114038 bytes
.../assets/tutorial-kafka-data-loader-08.png | Bin 0 -> 81750 bytes
.../assets/tutorial-kafka-data-loader-09.png | Bin 0 -> 141501 bytes
.../assets/tutorial-kafka-data-loader-10.png | Bin 0 -> 80127 bytes
.../assets/tutorial-kafka-data-loader-11.png | Bin 0 -> 74913 bytes
.../assets/tutorial-kafka-data-loader-12.png | Bin 0 -> 134001 bytes
.../assets/tutorial-kafka-submit-supervisor-01.png | Bin 0 -> 130690 bytes
docs/38.0.0/assets/tutorial-query-01.png | Bin 0 -> 78666 bytes
docs/38.0.0/assets/tutorial-query-02.png | Bin 0 -> 90958 bytes
docs/38.0.0/assets/tutorial-query-03.png | Bin 0 -> 118994 bytes
docs/38.0.0/assets/tutorial-query-04.png | Bin 0 -> 136945 bytes
docs/38.0.0/assets/tutorial-query-05.png | Bin 0 -> 135626 bytes
docs/38.0.0/assets/tutorial-query-06.png | Bin 0 -> 135743 bytes
docs/38.0.0/assets/tutorial-query-07.png | Bin 0 -> 148492 bytes
.../tutorial-query-deepstorage-retention-rule.png | Bin 0 -> 99106 bytes
docs/38.0.0/assets/tutorial-quickstart-01.png | Bin 0 -> 68216 bytes
docs/38.0.0/assets/tutorial-quickstart-02.png | Bin 0 -> 115511 bytes
docs/38.0.0/assets/tutorial-quickstart-03.png | Bin 0 -> 171269 bytes
docs/38.0.0/assets/tutorial-quickstart-04.png | Bin 0 -> 129369 bytes
docs/38.0.0/assets/tutorial-quickstart-05.png | Bin 0 -> 110367 bytes
docs/38.0.0/assets/tutorial-retention-00.png | Bin 0 -> 77704 bytes
docs/38.0.0/assets/tutorial-retention-01.png | Bin 0 -> 35171 bytes
docs/38.0.0/assets/tutorial-retention-02.png | Bin 0 -> 240310 bytes
docs/38.0.0/assets/tutorial-retention-03.png | Bin 0 -> 30029 bytes
docs/38.0.0/assets/tutorial-retention-04.png | Bin 0 -> 44617 bytes
docs/38.0.0/assets/tutorial-retention-05.png | Bin 0 -> 38992 bytes
docs/38.0.0/assets/tutorial-retention-06.png | Bin 0 -> 137570 bytes
.../38.0.0/assets/tutorial-sql-aggregate-query.png | Bin 0 -> 99042 bytes
docs/38.0.0/assets/tutorial-sql-auto-queries.png | Bin 0 -> 178642 bytes
.../assets/tutorial-sql-count-distinct-help.png | Bin 0 -> 190668 bytes
docs/38.0.0/assets/tutorial-sql-count-distinct.png | Bin 0 -> 109726 bytes
docs/38.0.0/assets/tutorial-sql-demo-queries.png | Bin 0 -> 158884 bytes
docs/38.0.0/assets/tutorial-sql-query-plan.png | Bin 0 -> 152371 bytes
.../assets/tutorial-sql-result-column-actions.png | Bin 0 -> 113313 bytes
docs/38.0.0/assets/tutorial-theta-01.png | Bin 0 -> 160923 bytes
docs/38.0.0/assets/tutorial-theta-02.png | Bin 0 -> 149124 bytes
docs/38.0.0/assets/tutorial-theta-03.png | Bin 0 -> 164755 bytes
docs/38.0.0/assets/tutorial-theta-04.png | Bin 0 -> 141568 bytes
docs/38.0.0/assets/tutorial-theta-05.png | Bin 0 -> 88165 bytes
docs/38.0.0/assets/tutorial-theta-06.png | Bin 0 -> 105328 bytes
docs/38.0.0/assets/tutorial-theta-07.png | Bin 0 -> 105225 bytes
docs/38.0.0/assets/tutorial-theta-08.png | Bin 0 -> 104913 bytes
docs/38.0.0/assets/web-console-0.7-tasks.png | Bin 0 -> 83141 bytes
docs/38.0.0/assets/web-console-01-home-view.png | Bin 0 -> 87581 bytes
.../38.0.0/assets/web-console-02-data-loader-1.png | Bin 0 -> 80007 bytes
.../38.0.0/assets/web-console-03-data-loader-2.png | Bin 0 -> 268671 bytes
docs/38.0.0/assets/web-console-04-datasources.png | Bin 0 -> 97639 bytes
docs/38.0.0/assets/web-console-05-retention.png | Bin 0 -> 86941 bytes
docs/38.0.0/assets/web-console-06-segments.png | Bin 0 -> 103333 bytes
docs/38.0.0/assets/web-console-07-supervisors.png | Bin 0 -> 51193 bytes
.../assets/web-console-08-supervisor-status.png | Bin 0 -> 89501 bytes
docs/38.0.0/assets/web-console-09-task-status.png | Bin 0 -> 201632 bytes
docs/38.0.0/assets/web-console-10-servers.png | Bin 0 -> 87782 bytes
docs/38.0.0/assets/web-console-11-query-sql.png | Bin 0 -> 131799 bytes
docs/38.0.0/assets/web-console-12-query-rune.png | Bin 0 -> 106246 bytes
docs/38.0.0/assets/web-console-13-lookups.png | Bin 0 -> 66934 bytes
docs/38.0.0/comparisons/druid-vs-elasticsearch.md | 39 ++
docs/38.0.0/comparisons/druid-vs-key-value.md | 46 ++
docs/38.0.0/comparisons/druid-vs-kudu.md | 39 ++
docs/38.0.0/comparisons/druid-vs-redshift.md | 62 ++
docs/38.0.0/comparisons/druid-vs-spark.md | 42 ++
docs/38.0.0/comparisons/druid-vs-sql-on-hadoop.md | 82 +++
.../{latest => 38.0.0}/configuration/extensions.md | 12 +-
docs/38.0.0/configuration/human-readable-byte.md | 98 +++
docs/{latest => 38.0.0}/configuration/index.md | 119 ++--
docs/{latest => 38.0.0}/configuration/logging.md | 35 -
.../data-management/automatic-compaction.md | 2 +-
.../38.0.0/data-management/cascading-reindexing.md | 414 ++++++++++++
.../data-management/compaction.md | 2 +-
docs/{latest => 38.0.0}/data-management/delete.md | 10 +-
docs/{latest => 38.0.0}/data-management/index.md | 2 +-
.../data-management/manual-compaction.md | 2 +-
.../data-management/schema-changes.md | 2 +-
docs/{latest => 38.0.0}/data-management/update.md | 2 +-
docs/{latest => 38.0.0}/design/architecture.md | 2 +-
docs/{latest => 38.0.0}/design/broker.md | 6 +-
docs/{latest => 38.0.0}/design/coordinator.md | 18 +-
docs/{latest => 38.0.0}/design/deep-storage.md | 2 +-
.../38.0.0/design/extensions-contrib/dropwizard.md | 95 +++
docs/{latest => 38.0.0}/design/historical.md | 8 +-
docs/{latest => 38.0.0}/design/index.md | 2 +-
docs/{latest => 38.0.0}/design/indexer.md | 4 +-
docs/{latest => 38.0.0}/design/indexing-service.md | 2 +-
docs/{latest => 38.0.0}/design/metadata-storage.md | 2 +-
docs/{latest => 38.0.0}/design/middlemanager.md | 2 +-
docs/{latest => 38.0.0}/design/overlord.md | 2 +-
docs/{latest => 38.0.0}/design/peons.md | 2 +-
docs/{latest => 38.0.0}/design/router.md | 2 +-
docs/{latest => 38.0.0}/design/segments.md | 2 +-
docs/38.0.0/design/storage.md | 140 ++++
docs/38.0.0/design/zookeeper.md | 66 ++
docs/{latest => 38.0.0}/development/build.md | 4 +-
.../development/docs-contribute.md | 2 +-
.../development/experimental.md} | 19 +-
.../extensions-contrib/aliyun-oss-extensions.md | 236 +++++++
.../extensions-contrib/ambari-metrics-emitter.md | 98 +++
.../development/extensions-contrib/cassandra.md} | 15 +-
.../development/extensions-contrib/cloudfiles.md | 42 ++
.../extensions-contrib/compressed-big-decimal.md | 280 ++++++++
.../development/extensions-contrib/consul.md | 2 +-
.../extensions-contrib/ddsketch-quantiles.md | 139 ++++
.../development/extensions-contrib/delta-lake.md | 52 ++
.../extensions-contrib/distinctcount.md | 99 +++
.../extensions-contrib/druid-exact-count-bitmap.md | 452 +++++++++++++
.../extensions-contrib/druid-ranger-security.md | 2 +-
.../extensions-contrib/gce-extensions.md | 103 +++
.../development/extensions-contrib/graphite.md | 117 ++++
.../development/extensions-contrib/iceberg.md | 2 +-
.../development/extensions-contrib/influx.md | 68 ++
.../extensions-contrib/influxdb-emitter.md | 78 +++
.../extensions-contrib/kafka-emitter.md | 66 ++
.../extensions-contrib/momentsketch-quantiles.md | 121 ++++
.../extensions-contrib/moving-average-query.md | 364 ++++++++++
.../extensions-contrib/openlineage-emitter.md | 98 +++
.../extensions-contrib/opentsdb-emitter.md | 62 ++
.../development/extensions-contrib/prometheus.md | 117 ++++
.../extensions-contrib/rabbit-stream-ingestion.md | 238 +++++++
.../development/extensions-contrib/redis-cache.md | 2 +
.../extensions-contrib/spectator-histogram.md | 586 +++++++++++++++++
.../development/extensions-contrib/sqlserver.md | 2 +-
.../development/extensions-contrib/statsd.md | 75 +++
.../extensions-contrib/tdigestsketch-quantiles.md | 12 +-
.../development/extensions-contrib/thrift.md | 119 ++++
.../development/extensions-contrib/time-min-max.md | 104 +++
.../extensions-core/approximate-histograms.md | 2 +-
.../development/extensions-core/avro.md | 2 +-
.../development/extensions-core/azure.md | 2 +-
.../development/extensions-core/bloom-filter.md | 2 +-
docs/38.0.0/development/extensions-core/catalog.md | 456 +++++++++++++
.../extensions-core/datasketches-extension.md | 2 +-
.../extensions-core/datasketches-hll.md | 2 +-
.../extensions-core/datasketches-kll.md | 2 +-
.../extensions-core/datasketches-quantiles.md | 2 +-
.../extensions-core/datasketches-theta.md | 2 +-
.../extensions-core/datasketches-tuple.md | 2 +-
.../development/extensions-core/druid-aws-rds.md | 38 ++
.../extensions-core/druid-basic-security.md | 2 +-
.../development/extensions-core/druid-kerberos.md | 2 +-
.../development/extensions-core/druid-lookups.md | 2 +-
.../development/extensions-core/druid-pac4j.md | 3 +-
.../development/extensions-core/examples.md | 2 +-
.../development/extensions-core/google.md | 2 +-
.../development/extensions-core/hdfs.md | 2 +-
.../development/extensions-core/k8s-jobs.md | 155 ++++-
.../development/extensions-core/kubernetes.md | 2 +-
.../development/extensions-core/mysql.md | 2 +-
.../development/extensions-core/orc.md | 2 +-
.../development/extensions-core/parquet.md | 4 +-
.../development/extensions-core/postgresql.md | 2 +-
.../development/extensions-core/protobuf.md | 2 +-
.../development/extensions-core/s3.md | 2 +-
.../extensions-core/simple-client-sslcontext.md | 2 +-
.../development/extensions-core/stats.md | 2 +-
.../development/extensions-core/test-stats.md | 2 +-
docs/{latest => 38.0.0}/development/javascript.md | 2 +-
docs/38.0.0/development/modules.md | 398 +++++++++++
docs/38.0.0/development/overview.md | 78 +++
docs/38.0.0/development/versioning.md | 46 ++
docs/38.0.0/ingestion/concurrent-append-replace.md | 153 +++++
docs/{latest => 38.0.0}/ingestion/data-formats.md | 22 +-
docs/38.0.0/ingestion/faq.md | 80 +++
docs/{latest => 38.0.0}/ingestion/hadoop.md | 4 +-
docs/{latest => 38.0.0}/ingestion/index.md | 2 +-
.../{latest => 38.0.0}/ingestion/ingestion-spec.md | 10 +-
docs/{latest => 38.0.0}/ingestion/input-sources.md | 4 +-
.../ingestion/kafka-ingestion.md | 58 +-
.../ingestion/kinesis-ingestion.md | 2 +-
.../ingestion/native-batch-firehose.md} | 11 +-
docs/38.0.0/ingestion/native-batch-simple-task.md | 185 ++++++
docs/{latest => 38.0.0}/ingestion/native-batch.md | 6 +-
docs/38.0.0/ingestion/partitioning.md | 107 +++
docs/38.0.0/ingestion/rollup.md | 96 +++
docs/{latest => 38.0.0}/ingestion/schema-design.md | 9 +-
docs/38.0.0/ingestion/schema-model.md | 58 ++
.../ingestion/standalone-realtime.md | 2 +-
docs/{latest => 38.0.0}/ingestion/streaming.md | 4 +-
docs/{latest => 38.0.0}/ingestion/supervisor.md | 106 ++-
docs/38.0.0/ingestion/tasks.md | 544 +++++++++++++++
.../parquet.md => 38.0.0/ingestion/tranquility.md} | 11 +-
docs/38.0.0/misc/papers-and-talks.md | 43 ++
.../multi-stage-query/concepts.md | 2 +-
docs/38.0.0/multi-stage-query/examples.md | 482 ++++++++++++++
docs/{latest => 38.0.0}/multi-stage-query/index.md | 5 +-
docs/38.0.0/multi-stage-query/known-issues.md | 77 +++
.../multi-stage-query/reference.md | 9 +-
.../multi-stage-query/security.md | 7 +-
docs/{latest => 38.0.0}/operations/alerts.md | 2 +-
docs/{latest => 38.0.0}/operations/auth-ldap.md | 2 +-
docs/{latest => 38.0.0}/operations/auth.md | 2 +-
.../operations/basic-cluster-tuning.md | 2 +-
.../operations/clean-metadata-store.md | 2 +-
docs/38.0.0/operations/deep-storage-migration.md | 66 ++
docs/{latest => 38.0.0}/operations/dump-segment.md | 2 +-
docs/38.0.0/operations/durable-storage.md | 122 ++++
docs/38.0.0/operations/dynamic-config-provider.md | 78 +++
docs/38.0.0/operations/export-metadata.md | 202 ++++++
.../operations/high-availability.md | 4 +-
.../operations/http-compression.md | 2 +-
.../operations/insert-segment-to-db.md | 2 +-
docs/{latest => 38.0.0}/operations/java.md | 22 +-
docs/{latest => 38.0.0}/operations/kubernetes.md | 4 +-
docs/38.0.0/operations/metadata-migration.md | 97 +++
docs/{latest => 38.0.0}/operations/metrics.md | 47 +-
.../operations/migrate-from-firehose-ingestion.md | 207 ++++++
.../operations/mixed-workloads.md | 2 +-
.../operations/password-provider.md | 2 +-
docs/{latest => 38.0.0}/operations/pull-deps.md | 14 +-
.../operations/request-logging.md | 2 +-
.../{latest => 38.0.0}/operations/reset-cluster.md | 2 +-
.../operations/rolling-updates.md | 2 +-
.../operations/rule-configuration.md | 2 +-
.../operations/security-overview.md | 4 +-
docs/38.0.0/operations/security-user-auth.md | 174 +++++
.../operations/segment-optimization.md | 2 +-
docs/38.0.0/operations/single-server.md | 57 ++
docs/{latest => 38.0.0}/operations/tls-support.md | 2 +-
docs/{latest => 38.0.0}/operations/web-console.md | 2 +-
docs/{latest => 38.0.0}/querying/aggregations.md | 10 +-
docs/{latest => 38.0.0}/querying/arrays.md | 4 +-
docs/{latest => 38.0.0}/querying/caching.md | 4 +-
docs/{latest => 38.0.0}/querying/dart.md | 1 +
docs/{latest => 38.0.0}/querying/datasource.md | 2 +-
.../querying/datasourcemetadataquery.md | 4 +-
docs/{latest => 38.0.0}/querying/dimensionspecs.md | 4 +-
docs/{latest => 38.0.0}/querying/filters.md | 4 +-
docs/{latest => 38.0.0}/querying/geo.md | 4 +-
docs/{latest => 38.0.0}/querying/granularities.md | 4 +-
docs/{latest => 38.0.0}/querying/groupbyquery.md | 6 +-
docs/{latest => 38.0.0}/querying/having.md | 4 +-
docs/{latest => 38.0.0}/querying/hll-old.md | 2 +-
docs/{latest => 38.0.0}/querying/joins.md | 2 +-
.../querying/kafka-extraction-namespace.md | 4 +-
docs/{latest => 38.0.0}/querying/limitspec.md | 2 +-
.../querying/lookups-cached-global.md | 2 +-
docs/{latest => 38.0.0}/querying/lookups.md | 2 +-
docs/{latest => 38.0.0}/querying/math-expr.md | 27 +-
.../querying/multi-value-dimensions.md | 4 +-
docs/{latest => 38.0.0}/querying/multitenancy.md | 2 +-
docs/{latest => 38.0.0}/querying/nested-columns.md | 2 +-
.../querying/post-aggregations.md | 4 +-
docs/38.0.0/querying/projections.md | 285 ++++++++
.../querying/query-context-reference.md | 8 +-
docs/{latest => 38.0.0}/querying/query-context.md | 2 +-
docs/38.0.0/querying/query-execution.md | 122 ++++
docs/38.0.0/querying/query-from-deep-storage.md | 206 ++++++
.../querying/query-processing.md | 2 +-
docs/{latest => 38.0.0}/querying/querying.md | 2 +-
docs/{latest => 38.0.0}/querying/scan-query.md | 4 +-
docs/{latest => 38.0.0}/querying/searchquery.md | 4 +-
.../querying/segmentmetadataquery.md | 4 +-
docs/{latest => 38.0.0}/querying/select-query.md | 2 +-
docs/{latest => 38.0.0}/querying/sorting-orders.md | 2 +-
.../querying/sql-aggregations.md | 2 +-
.../querying/sql-array-functions.md | 2 +-
docs/{latest => 38.0.0}/querying/sql-data-types.md | 2 +-
docs/{latest => 38.0.0}/querying/sql-functions.md | 4 +-
docs/38.0.0/querying/sql-json-functions.md | 75 +++
.../querying/sql-metadata-tables.md | 5 +-
.../querying/sql-multivalue-string-functions.md | 2 +-
docs/{latest => 38.0.0}/querying/sql-operators.md | 2 +-
.../querying/sql-query-context.md | 4 +-
docs/{latest => 38.0.0}/querying/sql-scalar.md | 2 +-
.../{latest => 38.0.0}/querying/sql-translation.md | 2 +-
.../querying/sql-window-functions.md | 4 +-
docs/{latest => 38.0.0}/querying/sql.md | 4 +-
.../querying/timeboundaryquery.md | 4 +-
.../{latest => 38.0.0}/querying/timeseriesquery.md | 4 +-
.../querying/tips-good-queries.md | 2 +-
docs/{latest => 38.0.0}/querying/topnmetricspec.md | 4 +-
docs/{latest => 38.0.0}/querying/topnquery.md | 4 +-
docs/38.0.0/querying/troubleshooting.md | 68 ++
docs/38.0.0/querying/using-caching.md | 96 +++
.../{latest => 38.0.0}/querying/virtual-columns.md | 4 +-
.../release-info/migr-ansi-sql-null.md | 2 +-
.../release-info/migr-front-coded-dict.md | 2 +-
docs/38.0.0/release-info/migr-mvd-array.md | 260 ++++++++
docs/38.0.0/release-info/migr-subquery-limit.md | 64 ++
.../release-info/migration-guide.md | 2 +-
docs/38.0.0/release-info/release-notes.md | 517 +++++++++++++++
.../release-info/upgrade-notes.md | 78 ++-
docs/{latest => 38.0.0}/tutorials/cluster.md | 12 +-
docs/{latest => 38.0.0}/tutorials/docker.md | 12 +-
docs/{latest => 38.0.0}/tutorials/index.md | 30 +-
.../tutorials/tutorial-append-data.md | 6 +-
.../tutorials/tutorial-batch-native.md | 2 +-
.../{latest => 38.0.0}/tutorials/tutorial-batch.md | 48 +-
.../tutorials/tutorial-compaction.md | 18 +-
.../tutorials/tutorial-delete-data.md | 8 +-
.../tutorials/tutorial-extern.md | 4 +-
.../tutorials/tutorial-ingestion-spec.md | 12 +-
.../tutorials/tutorial-jdbc.md} | 15 +-
.../{latest => 38.0.0}/tutorials/tutorial-kafka.md | 6 +-
docs/38.0.0/tutorials/tutorial-kerberos-hadoop.md | 103 +++
.../tutorials/tutorial-latest-by.md | 2 +-
.../tutorials/tutorial-msq-convert-spec.md | 5 +-
.../tutorials/tutorial-msq-extern.md | 5 +-
.../tutorials/tutorial-query-deep-storage.md | 287 ++++++++
.../{latest => 38.0.0}/tutorials/tutorial-query.md | 2 +-
.../tutorials/tutorial-retention.md | 8 +-
.../tutorials/tutorial-rollup.md | 2 +-
.../tutorials/tutorial-sketches-theta.md | 2 +-
.../tutorials/tutorial-sql-null.md | 2 +-
.../tutorials/tutorial-sql-query-view.md | 2 +-
.../tutorials/tutorial-transform.md | 2 +-
docs/38.0.0/tutorials/tutorial-unnest-arrays.md | 655 ++++++++++++++++++
.../tutorials/tutorial-update-data.md | 6 +-
docs/latest/api-reference/api-reference.md | 2 +-
.../api-reference/automatic-compaction-api.md | 2 +-
docs/latest/api-reference/data-management-api.md | 2 +-
.../api-reference/dynamic-configuration-api.md | 42 +-
docs/latest/api-reference/json-querying-api.md | 2 +-
docs/latest/api-reference/legacy-metadata-api.md | 2 +-
docs/latest/api-reference/lookups-api.md | 2 +-
docs/latest/api-reference/retention-rules-api.md | 2 +-
docs/latest/api-reference/service-status-api.md | 35 +-
docs/latest/api-reference/sql-api.md | 2 +-
docs/latest/api-reference/sql-ingestion-api.md | 11 +-
docs/latest/api-reference/sql-jdbc.md | 2 +-
docs/latest/api-reference/supervisor-api.md | 114 +++-
docs/latest/api-reference/tasks-api.md | 3 +-
docs/latest/configuration/extensions.md | 12 +-
docs/latest/configuration/index.md | 119 ++--
docs/latest/configuration/logging.md | 35 -
.../latest/data-management/automatic-compaction.md | 2 +-
docs/latest/data-management/compaction.md | 2 +-
docs/latest/data-management/delete.md | 10 +-
docs/latest/data-management/index.md | 2 +-
docs/latest/data-management/manual-compaction.md | 2 +-
docs/latest/data-management/schema-changes.md | 2 +-
docs/latest/data-management/update.md | 2 +-
docs/latest/design/architecture.md | 2 +-
docs/latest/design/broker.md | 6 +-
docs/latest/design/coordinator.md | 18 +-
docs/latest/design/deep-storage.md | 2 +-
docs/latest/design/historical.md | 8 +-
docs/latest/design/index.md | 2 +-
docs/latest/design/indexer.md | 4 +-
docs/latest/design/indexing-service.md | 2 +-
docs/latest/design/metadata-storage.md | 2 +-
docs/latest/design/middlemanager.md | 2 +-
docs/latest/design/overlord.md | 2 +-
docs/latest/design/peons.md | 2 +-
docs/latest/design/router.md | 2 +-
docs/latest/design/segments.md | 2 +-
docs/latest/design/zookeeper.md | 39 +-
docs/latest/development/build.md | 4 +-
docs/latest/development/docs-contribute.md | 2 +-
.../development/extensions-contrib/consul.md | 2 +-
.../extensions-contrib/druid-ranger-security.md | 2 +-
.../development/extensions-contrib/iceberg.md | 2 +-
.../extensions-contrib/openlineage-emitter.md | 98 +++
.../development/extensions-contrib/redis-cache.md | 2 +
.../development/extensions-contrib/sqlserver.md | 2 +-
.../extensions-contrib/tdigestsketch-quantiles.md | 12 +-
.../extensions-core/approximate-histograms.md | 2 +-
docs/latest/development/extensions-core/avro.md | 2 +-
docs/latest/development/extensions-core/azure.md | 2 +-
.../development/extensions-core/bloom-filter.md | 2 +-
.../extensions-core/datasketches-extension.md | 2 +-
.../extensions-core/datasketches-hll.md | 2 +-
.../extensions-core/datasketches-kll.md | 2 +-
.../extensions-core/datasketches-quantiles.md | 2 +-
.../extensions-core/datasketches-theta.md | 2 +-
.../extensions-core/datasketches-tuple.md | 2 +-
.../extensions-core/druid-basic-security.md | 2 +-
.../development/extensions-core/druid-kerberos.md | 2 +-
.../development/extensions-core/druid-lookups.md | 2 +-
.../development/extensions-core/druid-pac4j.md | 3 +-
.../latest/development/extensions-core/examples.md | 2 +-
docs/latest/development/extensions-core/google.md | 2 +-
docs/latest/development/extensions-core/hdfs.md | 2 +-
.../latest/development/extensions-core/k8s-jobs.md | 155 ++++-
.../development/extensions-core/kubernetes.md | 2 +-
docs/latest/development/extensions-core/mysql.md | 2 +-
docs/latest/development/extensions-core/orc.md | 2 +-
docs/latest/development/extensions-core/parquet.md | 4 +-
.../development/extensions-core/postgresql.md | 2 +-
.../latest/development/extensions-core/protobuf.md | 2 +-
docs/latest/development/extensions-core/s3.md | 2 +-
.../extensions-core/simple-client-sslcontext.md | 2 +-
docs/latest/development/extensions-core/stats.md | 2 +-
.../development/extensions-core/test-stats.md | 2 +-
docs/latest/development/javascript.md | 2 +-
docs/latest/ingestion/data-formats.md | 22 +-
docs/latest/ingestion/hadoop.md | 4 +-
docs/latest/ingestion/index.md | 2 +-
docs/latest/ingestion/ingestion-spec.md | 10 +-
docs/latest/ingestion/input-sources.md | 4 +-
docs/latest/ingestion/kafka-ingestion.md | 58 +-
docs/latest/ingestion/kinesis-ingestion.md | 2 +-
docs/latest/ingestion/native-batch.md | 6 +-
docs/latest/ingestion/schema-design.md | 9 +-
docs/latest/ingestion/standalone-realtime.md | 2 +-
docs/latest/ingestion/streaming.md | 4 +-
docs/latest/ingestion/supervisor.md | 106 ++-
docs/latest/multi-stage-query/concepts.md | 2 +-
docs/latest/multi-stage-query/index.md | 5 +-
docs/latest/multi-stage-query/reference.md | 9 +-
docs/latest/multi-stage-query/security.md | 7 +-
docs/latest/operations/alerts.md | 2 +-
docs/latest/operations/auth-ldap.md | 2 +-
docs/latest/operations/auth.md | 2 +-
docs/latest/operations/basic-cluster-tuning.md | 2 +-
docs/latest/operations/clean-metadata-store.md | 2 +-
docs/latest/operations/dump-segment.md | 2 +-
docs/latest/operations/high-availability.md | 4 +-
docs/latest/operations/http-compression.md | 2 +-
docs/latest/operations/insert-segment-to-db.md | 2 +-
docs/latest/operations/java.md | 22 +-
docs/latest/operations/kubernetes.md | 4 +-
docs/latest/operations/metrics.md | 47 +-
docs/latest/operations/mixed-workloads.md | 2 +-
docs/latest/operations/password-provider.md | 2 +-
docs/latest/operations/pull-deps.md | 14 +-
docs/latest/operations/request-logging.md | 2 +-
docs/latest/operations/reset-cluster.md | 2 +-
docs/latest/operations/rolling-updates.md | 2 +-
docs/latest/operations/rule-configuration.md | 2 +-
docs/latest/operations/security-overview.md | 4 +-
docs/latest/operations/segment-optimization.md | 2 +-
docs/latest/operations/tls-support.md | 2 +-
docs/latest/operations/web-console.md | 2 +-
docs/latest/querying/aggregations.md | 10 +-
docs/latest/querying/arrays.md | 4 +-
docs/latest/querying/caching.md | 4 +-
docs/latest/querying/dart.md | 1 +
docs/latest/querying/datasource.md | 2 +-
docs/latest/querying/datasourcemetadataquery.md | 4 +-
docs/latest/querying/dimensionspecs.md | 4 +-
docs/latest/querying/filters.md | 4 +-
docs/latest/querying/geo.md | 4 +-
docs/latest/querying/granularities.md | 4 +-
docs/latest/querying/groupbyquery.md | 6 +-
docs/latest/querying/having.md | 4 +-
docs/latest/querying/hll-old.md | 2 +-
docs/latest/querying/joins.md | 2 +-
docs/latest/querying/kafka-extraction-namespace.md | 4 +-
docs/latest/querying/limitspec.md | 2 +-
docs/latest/querying/lookups-cached-global.md | 2 +-
docs/latest/querying/lookups.md | 2 +-
docs/latest/querying/math-expr.md | 27 +-
docs/latest/querying/multi-value-dimensions.md | 4 +-
docs/latest/querying/multitenancy.md | 2 +-
docs/latest/querying/nested-columns.md | 2 +-
docs/latest/querying/post-aggregations.md | 4 +-
docs/latest/querying/query-context-reference.md | 8 +-
docs/latest/querying/query-context.md | 2 +-
docs/latest/querying/query-processing.md | 2 +-
docs/latest/querying/querying.md | 2 +-
docs/latest/querying/scan-query.md | 4 +-
docs/latest/querying/searchquery.md | 4 +-
docs/latest/querying/segmentmetadataquery.md | 4 +-
docs/latest/querying/select-query.md | 2 +-
docs/latest/querying/sorting-orders.md | 2 +-
docs/latest/querying/sql-aggregations.md | 2 +-
docs/latest/querying/sql-array-functions.md | 2 +-
docs/latest/querying/sql-data-types.md | 2 +-
docs/latest/querying/sql-functions.md | 4 +-
docs/latest/querying/sql-metadata-tables.md | 5 +-
.../querying/sql-multivalue-string-functions.md | 2 +-
docs/latest/querying/sql-operators.md | 2 +-
docs/latest/querying/sql-query-context.md | 4 +-
docs/latest/querying/sql-scalar.md | 2 +-
docs/latest/querying/sql-translation.md | 2 +-
docs/latest/querying/sql-window-functions.md | 4 +-
docs/latest/querying/sql.md | 4 +-
docs/latest/querying/timeboundaryquery.md | 4 +-
docs/latest/querying/timeseriesquery.md | 4 +-
docs/latest/querying/tips-good-queries.md | 2 +-
docs/latest/querying/topnmetricspec.md | 4 +-
docs/latest/querying/topnquery.md | 4 +-
docs/latest/querying/virtual-columns.md | 4 +-
docs/latest/release-info/migr-ansi-sql-null.md | 2 +-
docs/latest/release-info/migr-front-coded-dict.md | 2 +-
docs/latest/release-info/migration-guide.md | 2 +-
docs/latest/release-info/release-notes.md | 732 ++++++++-------------
docs/latest/release-info/upgrade-notes.md | 78 ++-
docs/latest/tutorials/cluster.md | 12 +-
docs/latest/tutorials/docker.md | 12 +-
docs/latest/tutorials/index.md | 30 +-
docs/latest/tutorials/tutorial-append-data.md | 6 +-
docs/latest/tutorials/tutorial-batch-native.md | 2 +-
docs/latest/tutorials/tutorial-batch.md | 48 +-
docs/latest/tutorials/tutorial-compaction.md | 18 +-
docs/latest/tutorials/tutorial-delete-data.md | 8 +-
docs/latest/tutorials/tutorial-extern.md | 4 +-
docs/latest/tutorials/tutorial-ingestion-spec.md | 12 +-
docs/latest/tutorials/tutorial-kafka.md | 6 +-
docs/latest/tutorials/tutorial-latest-by.md | 2 +-
docs/latest/tutorials/tutorial-msq-convert-spec.md | 5 +-
docs/latest/tutorials/tutorial-msq-extern.md | 5 +-
docs/latest/tutorials/tutorial-query.md | 2 +-
docs/latest/tutorials/tutorial-retention.md | 8 +-
docs/latest/tutorials/tutorial-rollup.md | 2 +-
docs/latest/tutorials/tutorial-sketches-theta.md | 2 +-
docs/latest/tutorials/tutorial-sql-null.md | 2 +-
docs/latest/tutorials/tutorial-sql-query-view.md | 2 +-
docs/latest/tutorials/tutorial-transform.md | 2 +-
docs/latest/tutorials/tutorial-update-data.md | 6 +-
static/js/version.js | 8 +-
588 files changed, 13953 insertions(+), 1621 deletions(-)
diff --git a/docs/latest/api-reference/api-reference.md b/docs/38.0.0/api-reference/api-reference.md
similarity index 94%
copy from docs/latest/api-reference/api-reference.md
copy to docs/38.0.0/api-reference/api-reference.md
index dd4a4ab63..d8fc86ee2 100644
--- a/docs/latest/api-reference/api-reference.md
+++ b/docs/38.0.0/api-reference/api-reference.md
@@ -24,7 +24,7 @@ sidebar_label: Overview
-->
-This topic is an index to the Apache Druid API documentation.
+This topic is an index to the Apache® Druid API documentation.
## HTTP APIs
* [Druid SQL queries](./sql-api.md) to submit SQL queries using the Druid SQL API.
diff --git a/docs/latest/api-reference/automatic-compaction-api.md b/docs/38.0.0/api-reference/automatic-compaction-api.md
similarity index 99%
copy from docs/latest/api-reference/automatic-compaction-api.md
copy to docs/38.0.0/api-reference/automatic-compaction-api.md
index 4f2ce3d62..5b052c99e 100644
--- a/docs/latest/api-reference/automatic-compaction-api.md
+++ b/docs/38.0.0/api-reference/automatic-compaction-api.md
@@ -27,7 +27,7 @@ import TabItem from '@theme/TabItem';
~ under the License.
-->
-This topic describes the status and configuration API endpoints for [automatic compaction using Coordinator duties](../data-management/automatic-compaction.md#auto-compaction-using-coordinator-duties) in Apache Druid. You can configure automatic compaction in the Druid web console or API.
+This topic describes the status and configuration API endpoints for [automatic compaction using Coordinator duties](../data-management/automatic-compaction.md#auto-compaction-using-coordinator-duties) in Apache® Druid. You can configure automatic compaction in the Druid web console or API.
:::info[Experimental]
diff --git a/docs/latest/api-reference/data-management-api.md b/docs/38.0.0/api-reference/data-management-api.md
similarity index 99%
copy from docs/latest/api-reference/data-management-api.md
copy to docs/38.0.0/api-reference/data-management-api.md
index fe37c6a81..53f90b1c7 100644
--- a/docs/latest/api-reference/data-management-api.md
+++ b/docs/38.0.0/api-reference/data-management-api.md
@@ -26,7 +26,7 @@ sidebar_label: Data management
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-This topic describes the data management API endpoints for Apache Druid.
+This topic describes the data management API endpoints for Apache® Druid.
This includes information on how to mark segments as used or unused and delete them from Druid.
In this topic, `http://ROUTER_IP:ROUTER_PORT` is a placeholder for your Router service address and port.
diff --git a/docs/latest/api-reference/dynamic-configuration-api.md b/docs/38.0.0/api-reference/dynamic-configuration-api.md
similarity index 92%
copy from docs/latest/api-reference/dynamic-configuration-api.md
copy to docs/38.0.0/api-reference/dynamic-configuration-api.md
index 95166aa3c..fefbc22c3 100644
--- a/docs/latest/api-reference/dynamic-configuration-api.md
+++ b/docs/38.0.0/api-reference/dynamic-configuration-api.md
@@ -27,7 +27,7 @@ import TabItem from '@theme/TabItem';
~ under the License.
-->
-This document describes the API endpoints to retrieve and manage dynamic configurations for the [Coordinator](../design/coordinator.md) and [Overlord](../design/overlord.md) in Apache Druid.
+This document describes the API endpoints to retrieve and manage dynamic configurations for the [Coordinator](../design/coordinator.md) and [Overlord](../design/overlord.md) in 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.
@@ -107,7 +107,10 @@ Host: http://ROUTER_IP:ROUTER_PORT
"smartSegmentLoading": true,
"debugDimensions": null,
"turboLoadingNodes": [],
- "cloneServers": {}
+ "cloneServers": {},
+ "historicalTierAliases": {
+ "hot": ["hot_1", "hot_2"]
+ }
}
```
@@ -368,6 +371,7 @@ Host: http://ROUTER_IP:ROUTER_PORT
{
"queryBlocklist": [
{
+ "type": "default",
"ruleName": "block-expensive-scans",
"dataSources": ["large_table"],
"queryTypes": ["scan"]
@@ -437,11 +441,13 @@ curl -X POST "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/broker/config" \
-d '{
"queryBlocklist": [
{
+ "type": "default",
"ruleName": "block-expensive-scans",
"dataSources": ["large_table", "huge_dataset"],
"queryTypes": ["scan"]
},
{
+ "type": "default",
"ruleName": "block-debug-queries",
"contextMatches": {
"debug": "true"
@@ -478,11 +484,13 @@ X-Druid-Comment: Add query blocklist rules and set default context
{
"queryBlocklist": [
{
+ "type": "default",
"ruleName": "block-expensive-scans",
"dataSources": ["large_table", "huge_dataset"],
"queryTypes": ["scan"]
},
{
+ "type": "default",
"ruleName": "block-debug-queries",
"contextMatches": {
"debug": "true"
@@ -526,22 +534,42 @@ The following table shows the dynamic configuration properties for the Broker.
Query blocklist rules allow you to block specific queries based on datasource, query type, and/or query context parameters. This feature is useful for preventing expensive or problematic queries from impacting cluster performance.
-Each rule in the `queryBlocklist` array is a JSON object with the following properties:
+Each rule in the `queryBlocklist` array is a JSON object. The `type` field selects the rule implementation. If omitted, it defaults to `"default"`. A query is blocked if it matches ANY rule in the blocklist (OR logic between rules).
+
+> **Note:** The `"type"` field is not required for `"default"` rules (existing configs without it continue to work), but including it explicitly is recommended for clarity.
+
+##### `default` type
+
+The built-in rule type. Blocks queries by matching on datasource, query type, and/or query context parameters.
|Property|Description|Required|Default|
|--------|-----------|--------|-------|
+|`type`|Rule type identifier. Not required — rules without a `"type"` field are treated as `"default"` for backwards compatibility with existing configurations.|No|`"default"`|
|`ruleName`|Unique name identifying this blocklist rule. Used in error messages when queries are blocked.|Yes|N/A|
|`dataSources`|List of datasource names to match. A query matches if it references any datasource in this list.|No|Matches all datasources|
|`queryTypes`|List of query types to match (e.g., `scan`, `timeseries`, `groupBy`, `topN`). A query matches if its type is in this list.|No|Matches all query types|
|`contextMatches`|Map of query context parameter key-value pairs to match. A query matches if all specified context parameters match the provided values (case-sensitive string comparison).|No|Matches all contexts|
-**Rule matching behavior:**
+**Matching behavior:**
- A query must match ALL specified criteria within a rule (AND logic) to be blocked by that rule
-- If any criterion is omitted, empty or null, it matches everything (e.g., omitting `queryTypes` or setting it to null matches all query types)
+- If any criterion is omitted, empty, or null, it matches everything (e.g., omitting `queryTypes` or setting it to null matches all query types)
- For context matching: if a rule specifies context parameters, queries with missing or null values for those keys will not match
- At least one criterion must be specified per rule to prevent accidentally blocking all queries
-- A query is blocked if it matches ANY rule in the blocklist (OR logic between rules)
+
+##### Custom types (extensions)
+
+Extensions can register additional rule types by adding Jackson subtypes to the `QueryBlocklistRule` interface. A custom rule is selected by setting `"type"` to its registered name:
+
+```json
+{
+ "type": "myCustomRule",
+ "ruleName": "rate-limit-heavy-users",
+ ...
+}
+```
+
+Custom types define their own matching semantics — they may use different criteria and logic than the `default` type described above. If a rule references a type whose extension is not loaded, deserialization fails with an error rather than silently falling back to the default type.
**Error response:**
@@ -673,7 +701,7 @@ Host: http://ROUTER_IP:ROUTER_PORT
"comment": "Add query blocklist rules",
"ip": "127.0.0.1"
},
- "payload": "{\"queryBlocklist\":[{\"ruleName\":\"block-expensive-scans\",\"dataSources\":[\"large_table\"],\"queryTypes\":[\"scan\"]}],\"queryContext\":{\"priority\":0,\"timeout\":300000},\"perSegmentTimeoutConfig\":{\"large_table\":{\"perSegmentTimeoutMs\":10000,\"monitorOnly\":false}}}",
+ "payload": "{\"queryBlocklist\":[{\"type\":\"default\",\"ruleName\":\"block-expensive-scans\",\"dataSources\":[\"large_table\"],\"queryTypes\":[\"scan\"]}],\"queryContext\":{\"priority\":0,\"timeout\":300000},\"perSegmentTimeoutConfig\":{\"large_table\":{\"perSegmentTimeoutMs\":10000,\"monitorOnly\":false}}}",
"auditTime": "2024-03-06T12:00:00.000Z"
}
]
diff --git a/docs/latest/api-reference/json-querying-api.md b/docs/38.0.0/api-reference/json-querying-api.md
similarity index 99%
copy from docs/latest/api-reference/json-querying-api.md
copy to docs/38.0.0/api-reference/json-querying-api.md
index 5d03ec8b3..26eb9c7e9 100644
--- a/docs/latest/api-reference/json-querying-api.md
+++ b/docs/38.0.0/api-reference/json-querying-api.md
@@ -27,7 +27,7 @@ import TabItem from '@theme/TabItem';
~ under the License.
-->
-This topic describes the API endpoints to submit JSON-based [native queries](../querying/querying.md) to Apache Druid.
+This topic describes the API endpoints to submit JSON-based [native queries](../querying/querying.md) to Apache® Druid.
In this topic, `http://SERVICE_IP:SERVICE_PORT` is a placeholder for the server address of deployment and the service port. For example, on the quickstart configuration, replace `http://ROUTER_IP:ROUTER_PORT` with `http://localhost:8888`.
diff --git a/docs/latest/api-reference/legacy-metadata-api.md b/docs/38.0.0/api-reference/legacy-metadata-api.md
similarity index 99%
copy from docs/latest/api-reference/legacy-metadata-api.md
copy to docs/38.0.0/api-reference/legacy-metadata-api.md
index d22be18a7..b7114b84d 100644
--- a/docs/latest/api-reference/legacy-metadata-api.md
+++ b/docs/38.0.0/api-reference/legacy-metadata-api.md
@@ -23,7 +23,7 @@ sidebar_label: Legacy metadata
~ under the License.
-->
-This document describes the legacy API endpoints to retrieve datasource metadata from Apache Druid. Use the [SQL metadata tables](../querying/sql-metadata-tables.md) to retrieve datasource metadata instead.
+This document describes the legacy API endpoints to retrieve datasource metadata from Apache® Druid. Use the [SQL metadata tables](../querying/sql-metadata-tables.md) to retrieve datasource metadata instead.
## Segment loading
diff --git a/docs/latest/api-reference/lookups-api.md b/docs/38.0.0/api-reference/lookups-api.md
similarity index 99%
copy from docs/latest/api-reference/lookups-api.md
copy to docs/38.0.0/api-reference/lookups-api.md
index 4a122917b..270699a57 100644
--- a/docs/latest/api-reference/lookups-api.md
+++ b/docs/38.0.0/api-reference/lookups-api.md
@@ -23,7 +23,7 @@ sidebar_label: Lookups
~ under the License.
-->
-This document describes the API endpoints to configure, update, retrieve, and manage lookups for Apache Druid.
+This document describes the API endpoints to configure, update, retrieve, and manage lookups for Apache® Druid.
## Configure lookups
diff --git a/docs/latest/api-reference/retention-rules-api.md b/docs/38.0.0/api-reference/retention-rules-api.md
similarity index 99%
copy from docs/latest/api-reference/retention-rules-api.md
copy to docs/38.0.0/api-reference/retention-rules-api.md
index c21e546ab..979fb213a 100644
--- a/docs/latest/api-reference/retention-rules-api.md
+++ b/docs/38.0.0/api-reference/retention-rules-api.md
@@ -27,7 +27,7 @@ import TabItem from '@theme/TabItem';
~ under the License.
-->
-This topic describes the API endpoints for managing retention rules in Apache Druid. You can configure retention rules in the Druid web console or API.
+This topic describes the API endpoints for managing retention rules in Apache® Druid. You can configure retention rules in the Druid web console or API.
Druid uses retention rules to determine what data is retained in the cluster. Druid supports load, drop, and broadcast rules. For more information, see [Using rules to drop and retain data](../operations/rule-configuration.md).
diff --git a/docs/latest/api-reference/service-status-api.md b/docs/38.0.0/api-reference/service-status-api.md
similarity index 95%
copy from docs/latest/api-reference/service-status-api.md
copy to docs/38.0.0/api-reference/service-status-api.md
index 47d2a5a6d..1a7126032 100644
--- a/docs/latest/api-reference/service-status-api.md
+++ b/docs/38.0.0/api-reference/service-status-api.md
@@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem';
-->
-This document describes the API endpoints to retrieve service status, cluster information for Apache Druid.
+This document describes the API endpoints to retrieve service status, cluster information for Apache® Druid.
In this document, `http://SERVICE_IP:SERVICE_PORT` is a placeholder for the server address of deployment and the service port. For example, on the quickstart configuration, replace `http://ROUTER_IP:ROUTER_PORT` with `http://localhost:8888`.
@@ -154,36 +154,6 @@ Host: http://ROUTER_IP:ROUTER_PORT
"name": "org.apache.druid.query.aggregation.datasketches.kll.KllSketchModule",
"artifact": "druid-datasketches",
"version": "26.0.0"
- },
- {
- "name": "org.apache.druid.msq.guice.MSQExternalDataSourceModule",
- "artifact": "druid-multi-stage-query",
- "version": "26.0.0"
- },
- {
- "name": "org.apache.druid.msq.guice.MSQIndexingModule",
- "artifact": "druid-multi-stage-query",
- "version": "26.0.0"
- },
- {
- "name": "org.apache.druid.msq.guice.MSQDurableStorageModule",
- "artifact": "druid-multi-stage-query",
- "version": "26.0.0"
- },
- {
- "name": "org.apache.druid.msq.guice.MSQServiceClientModule",
- "artifact": "druid-multi-stage-query",
- "version": "26.0.0"
- },
- {
- "name": "org.apache.druid.msq.guice.MSQSqlModule",
- "artifact": "druid-multi-stage-query",
- "version": "26.0.0"
- },
- {
- "name": "org.apache.druid.msq.guice.SqlTaskModule",
- "artifact": "druid-multi-stage-query",
- "version": "26.0.0"
}
],
"memory": {
@@ -326,7 +296,7 @@ Host: http://ROUTER_IP:ROUTER_PORT
"log4j.shutdownHookEnabled": "true",
"java.vm.vendor": "Homebrew",
"sun.arch.data.model": "64",
- "druid.extensions.loadList": "[\"druid-hdfs-storage\", \"druid-kafka-indexing-service\", \"druid-datasketches\", \"druid-multi-stage-query\"]",
+ "druid.extensions.loadList": "[\"druid-hdfs-storage\", \"druid-kafka-indexing-service\", \"druid-datasketches\"]",
"java.vendor.url": "https://github.com/Homebrew/homebrew-core/issues",
"druid.router.coordinatorServiceName": "druid/coordinator",
"user.timezone": "UTC",
@@ -413,7 +383,6 @@ Host: http://ROUTER_IP:ROUTER_PORT
Retrieves a JSON map of the form `{"selfDiscovered": true/false}`, indicating whether the node has received a confirmation from the central node discovery mechanism (currently ZooKeeper) of the Druid cluster that the node has been added to the cluster.
Only consider a Druid node "healthy" or "ready" in automated deployment/container management systems when this endpoint returns `{"selfDiscovered": true}`. Nodes experiencing network issues may become isolated and are not healthy.
-For nodes that use Zookeeper segment discovery, a response of `{"selfDiscovered": true}` indicates that the node's Zookeeper client has started receiving data from the Zookeeper cluster, enabling timely discovery of segments and other nodes.
#### URL
diff --git a/docs/latest/api-reference/sql-api.md b/docs/38.0.0/api-reference/sql-api.md
similarity index 99%
copy from docs/latest/api-reference/sql-api.md
copy to docs/38.0.0/api-reference/sql-api.md
index 37b79e83c..b9f037740 100644
--- a/docs/latest/api-reference/sql-api.md
+++ b/docs/38.0.0/api-reference/sql-api.md
@@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem';
-->
:::info
- Apache Druid supports two query languages: Druid SQL and [native queries](../querying/querying.md).
+ Apache® Druid supports two query languages: Druid SQL and [native queries](../querying/querying.md).
This document describes the SQL language.
:::
diff --git a/docs/latest/api-reference/sql-ingestion-api.md b/docs/38.0.0/api-reference/sql-ingestion-api.md
similarity index 97%
copy from docs/latest/api-reference/sql-ingestion-api.md
copy to docs/38.0.0/api-reference/sql-ingestion-api.md
index 59942aff8..4400bc278 100644
--- a/docs/latest/api-reference/sql-ingestion-api.md
+++ b/docs/38.0.0/api-reference/sql-ingestion-api.md
@@ -26,9 +26,8 @@ import TabItem from '@theme/TabItem';
-->
:::info
- This page describes SQL-based batch ingestion using the [`druid-multi-stage-query`](../multi-stage-query/index.md)
- extension, new in Druid 24.0. Refer to the [ingestion methods](../ingestion/index.md#batch) table to determine which
- ingestion method is right for you.
+ This page describes SQL-based batch ingestion using the [multi-stage query (MSQ) task engine](../multi-stage-query/index.md).
+ Refer to the [ingestion methods](../ingestion/index.md#batch) table to determine which ingestion method is right for you.
:::
The **Query** view in the web console provides a friendly experience for the multi-stage query task engine (MSQ task engine) and multi-stage query architecture. We recommend using the web console if you don't need a programmatic interface.
@@ -49,7 +48,7 @@ The `/druid/v2/sql/task` endpoint accepts the following:
- [SQL requests in the JSON-over-HTTP form](sql-api.md#request-body) using the
`query`, `context`, and `parameters` fields. The endpoint ignores the `resultFormat`, `header`, `typesHeader`, and `sqlTypesHeader` fields.
- [INSERT](../multi-stage-query/reference.md#insert) and [REPLACE](../multi-stage-query/reference.md#replace) statements.
-- SELECT queries (experimental feature). SELECT query results are collected from workers by the controller, and written into the [task report](#get-the-report-for-a-query-task) as an array of arrays. The behavior and result format of plain SELECT queries (without INSERT or REPLACE) is subject to change.
+- SELECT queries as batch tasks. SELECT query results are collected from workers by the controller and written into the [task report](#get-the-report-for-a-query-task) as an array of arrays.
### URL
@@ -298,7 +297,7 @@ Keep the following in mind when using the task API to view reports:
- The task report for an entire job is associated with the `query_controller` task. The `query_worker` tasks don't have their own reports; their information is incorporated into the controller report.
- The task report API may report `404 Not Found` temporarily while the task is in the process of starting up.
-- As an experimental feature, the MSQ task engine supports running SELECT queries. SELECT query results are written into
+- The MSQ task engine supports running SELECT queries. SELECT query results are written into
the `multiStageQuery.payload.results.results` task report key as an array of arrays. The behavior and result format of plain
SELECT queries (without INSERT or REPLACE) is subject to change.
- `multiStageQuery.payload.results.resultsTruncated` denotes whether the results of the report have been truncated to prevent the reports from blowing up.
@@ -847,4 +846,4 @@ The response shows the ID of the task that was canceled.
{
"task": "query-655efe33-781a-4c50-ae84-c2911b42d63c"
}
-```
\ No newline at end of file
+```
diff --git a/docs/latest/api-reference/sql-jdbc.md b/docs/38.0.0/api-reference/sql-jdbc.md
similarity index 99%
copy from docs/latest/api-reference/sql-jdbc.md
copy to docs/38.0.0/api-reference/sql-jdbc.md
index affe9ea73..771ee24e4 100644
--- a/docs/latest/api-reference/sql-jdbc.md
+++ b/docs/38.0.0/api-reference/sql-jdbc.md
@@ -24,7 +24,7 @@ sidebar_label: SQL JDBC driver
-->
:::info
- Apache Druid supports two query languages: Druid SQL and [native queries](../querying/querying.md).
+ Apache® Druid supports two query languages: Druid SQL and [native queries](../querying/querying.md).
This document describes the SQL language.
:::
diff --git a/docs/latest/api-reference/supervisor-api.md b/docs/38.0.0/api-reference/supervisor-api.md
similarity index 96%
copy from docs/latest/api-reference/supervisor-api.md
copy to docs/38.0.0/api-reference/supervisor-api.md
index 2f0d72ded..48dbd1d47 100644
--- a/docs/latest/api-reference/supervisor-api.md
+++ b/docs/38.0.0/api-reference/supervisor-api.md
@@ -25,8 +25,8 @@ import TabItem from '@theme/TabItem';
~ under the License.
-->
-This topic describes the API endpoints to manage and monitor supervisors for Apache Druid.
-The topic uses the Apache Kafka term offset to refer to the identifier for records in a partition. If you are using Amazon Kinesis, the equivalent is sequence number.
+This topic describes the API endpoints to manage and monitor supervisors for Apache® Druid.
+The topic uses the Apache Kafka® term offset to refer to the identifier for records in a partition. If you are using Amazon Kinesis, the equivalent is sequence number.
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.
@@ -2508,11 +2508,16 @@ curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor?skipRestartIfUnmo
```json
{
- "id": "social_media"
+ "id": "social_media",
+ "restarted": true
}
```
</details>
+The response includes the following fields:
+- `id`: The supervisor ID.
+- `restarted`: A boolean indicating whether the supervisor was restarted. When `skipRestartIfUnmodified` is set to `true` and the supervisor spec is unchanged, this field will be `false`; otherwise, it will be `true`.
+
### 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.
@@ -3534,6 +3539,109 @@ when the supervisor's tasks restart, they resume reading from `{"0": 100, "1": 1
```
</details>
+### Reset offsets to latest and start a backfill supervisor
+
+This endpoint is supported for Apache Kafka and RabbitMQ Stream supervisors. Amazon Kinesis is not supported yet.
+
+Resets the supervisor to the latest available stream offsets and starts a new bounded backfill supervisor to ingest the data in the skipped range.
+
+This endpoint is useful when a supervisor has fallen behind and you want to catch it up to the latest offsets without losing the skipped data. The main supervisor resumes ingesting from the latest offsets, while the backfill supervisor processes the range from the previously checkpointed offsets up to the latest offsets at the time of the reset.
+
+**Duplicate ingestion notice:** The main supervisor is not quiesced before the reset. This means duplicate data can occur in two ways:
+- **Backfill overlap:** Any tasks that were in-flight at the time of the reset may publish segments covering part of the backfill range before being shut down.
+- **Reset race:** If a task checkpoint is written to the metadata store between when this endpoint captures the current offsets and when it applies the reset, that checkpoint can be overwritten, causing the main supervisor to re-ingest already-processed data.
+
+Both windows are narrow in practice, but cannot be fully eliminated without manually suspending the main supervisor before calling this endpoint and waiting for all pending tasks to complete.
+
+The following requirements must be met before calling this endpoint:
+
+- The supervisor must be a [streaming supervisor](../ingestion/supervisor.md).
+- The supervisor's `useEarliestSequenceNumber` property must be `false`.
+- The supervisor context must have `useConcurrentLocks` set to `true` to allow the backfill supervisor's tasks to write concurrently with the main supervisor's tasks.
+- The supervisor must be in a `RUNNING` state.
+
+The backfill supervisor has the same configuration as the source supervisor except for its ID, which takes the form `{supervisorId}_backfill_{randomSuffix}`, and its `boundedStreamConfig`, which is set to the skipped offset range. If `backfillTaskCount` is specified, it overrides the `taskCount` for the backfill supervisor only.
+
+#### URL
+
+`POST` `/druid/indexer/v1/supervisor/{supervisorId}/resetToLatestAndBackfill`
+
+#### Query parameters
+
+| Parameter | Type | Description | Default |
+|---------|---------|---------|---------|
+| `backfillTaskCount` | Integer | Number of parallel tasks for the backfill supervisor. | Defaults to `taskCount` from the source supervisor if not specified |
+
+#### Responses
+
+<Tabs>
+
+<TabItem value="5" label="200 SUCCESS">
+
+
+*Successfully reset and started backfill supervisor*
+
+</TabItem>
+<TabItem value="6" label="400 BAD REQUEST">
+
+
+*Supervisor does not meet requirements (wrong type, `useEarliestSequenceNumber` is true, `useConcurrentLocks` not enabled, or supervisor not RUNNING)*
+
+</TabItem>
+<TabItem value="7" label="404 NOT FOUND">
+
+
+*Invalid supervisor ID*
+
+</TabItem>
+<TabItem value="8" label="500 SERVER ERROR">
+
+
+*Failed to retrieve stream offsets or serialize the backfill spec*
+
+</TabItem>
+</Tabs>
+
+---
+
+#### Sample request
+
+The following example resets a supervisor named `social_media` and starts a backfill supervisor with 2 tasks.
+
+<Tabs>
+
+<TabItem value="9" label="cURL">
+
+
+```shell
+curl --request POST "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/supervisor/social_media/resetToLatestAndBackfill?backfillTaskCount=2"
+```
+
+</TabItem>
+<TabItem value="10" label="HTTP">
+
+
+```HTTP
+POST /druid/indexer/v1/supervisor/social_media/resetToLatestAndBackfill?backfillTaskCount=2 HTTP/1.1
+Host: http://ROUTER_IP:ROUTER_PORT
+```
+
+</TabItem>
+</Tabs>
+
+#### Sample response
+
+<details>
+ <summary>View the response</summary>
+
+ ```json
+{
+ "id": "social_media",
+ "backfillSupervisorId": "social_media_backfill_abcdefgh"
+}
+ ```
+</details>
+
### Terminate a supervisor
Terminates a supervisor and its associated indexing tasks, triggering the publishing of their segments. When you terminate a supervisor, Druid places a tombstone marker in the metadata store to prevent reloading on restart.
diff --git a/docs/latest/api-reference/tasks-api.md b/docs/38.0.0/api-reference/tasks-api.md
similarity index 99%
copy from docs/latest/api-reference/tasks-api.md
copy to docs/38.0.0/api-reference/tasks-api.md
index f53037f84..cf7257f3e 100644
--- a/docs/latest/api-reference/tasks-api.md
+++ b/docs/38.0.0/api-reference/tasks-api.md
@@ -27,7 +27,7 @@ import TabItem from '@theme/TabItem';
~ under the License.
-->
-This document describes the API endpoints for task retrieval, submission, and deletion for Apache Druid. Tasks are individual jobs performed by Druid to complete operations such as ingestion, querying, and compaction.
+This document describes the API endpoints for task retrieval, submission, and deletion for Apache® Druid. Tasks are individual jobs performed by Druid to complete operations such as ingestion, querying, and compaction.
In this topic, `http://ROUTER_IP:ROUTER_PORT` is a placeholder for the Router service address and port. For example, on the quickstart configuration, use `http://localhost:8888`.
@@ -1079,7 +1079,6 @@ Host: http://ROUTER_IP:ROUTER_PORT
2023-07-03T22:11:18,009 INFO [main] org.eclipse.jetty.server.session - node0 Stopped scavenging
2023-07-03T22:11:18,012 INFO [main] org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@742aa00a{/,null,STOPPED}
2023-07-03T22:11:18,014 INFO [main] org.apache.druid.java.util.common.lifecycle.Lifecycle - Stopping lifecycle [module] stage [NORMAL]
- 2023-07-03T22:11:18,014 INFO [main] org.apache.druid.server.coordination.ZkCoordinator - Stopping ZkCoordinator for [DruidServerMetadata{name='localhost:8100', hostAndPort='localhost:8100', hostAndTlsPort='null', maxSize=0, tier='_default_tier', type=indexer-executor, priority=0}]
2023-07-03T22:11:18,014 INFO [main] org.apache.druid.server.coordination.SegmentLoadDropHandler - Stopping...
2023-07-03T22:11:18,014 INFO [main] org.apache.druid.server.coordination.SegmentLoadDropHandler - Stopped.
2023-07-03T22:11:18,014 INFO [main] org.apache.druid.indexing.overlord.SingleTaskBackgroundRunner - Starting graceful shutdown of task[index_kafka_social_media_0e905aa31037879_nommnaeg].
diff --git a/docs/38.0.0/assets/compaction-config.png b/docs/38.0.0/assets/compaction-config.png
new file mode 100644
index 000000000..9dbcfefa8
Binary files /dev/null and b/docs/38.0.0/assets/compaction-config.png differ
diff --git a/docs/38.0.0/assets/datasources-action-button.png b/docs/38.0.0/assets/datasources-action-button.png
new file mode 100644
index 000000000..6a52b8444
Binary files /dev/null and b/docs/38.0.0/assets/datasources-action-button.png differ
diff --git a/docs/38.0.0/assets/druid-architecture.png b/docs/38.0.0/assets/druid-architecture.png
new file mode 100644
index 000000000..954a87bc1
Binary files /dev/null and b/docs/38.0.0/assets/druid-architecture.png differ
diff --git a/docs/38.0.0/assets/druid-architecture.svg b/docs/38.0.0/assets/druid-architecture.svg
new file mode 100644
index 000000000..9d0e67188
--- /dev/null
+++ b/docs/38.0.0/assets/druid-architecture.svg
@@ -0,0 +1,19 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:lucid="lucid" width="1967.24" height="872.83"><g transform="translate(5341 -19.5)" lucid:page-tab-id="0_0"><path d="M-5320 166a6 6 0 0 1 6-6h508a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6h-508a6 6 0 0 1-6-6zM-4640 166a6 6 0 0 1 6-6h508a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6h-508a6 6 0 0 1-6-6zM-3960 166a6 6 0 0 1 6-6h508a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6h-508a6 6 0 0 1-6-6z" stroke="#cfe4ff" stroke-width="2" fill="#cf [...]
\ No newline at end of file
diff --git a/docs/38.0.0/assets/druid-column-types.png b/docs/38.0.0/assets/druid-column-types.png
new file mode 100644
index 000000000..9db56c068
Binary files /dev/null and b/docs/38.0.0/assets/druid-column-types.png differ
diff --git a/docs/38.0.0/assets/druid-dataflow-2x.png b/docs/38.0.0/assets/druid-dataflow-2x.png
new file mode 100644
index 000000000..ab1c583e4
Binary files /dev/null and b/docs/38.0.0/assets/druid-dataflow-2x.png differ
diff --git a/docs/38.0.0/assets/druid-dataflow-3.png b/docs/38.0.0/assets/druid-dataflow-3.png
new file mode 100644
index 000000000..355215cbc
Binary files /dev/null and b/docs/38.0.0/assets/druid-dataflow-3.png differ
diff --git a/docs/38.0.0/assets/druid-manage-1.png b/docs/38.0.0/assets/druid-manage-1.png
new file mode 100644
index 000000000..0d10c6e7b
Binary files /dev/null and b/docs/38.0.0/assets/druid-manage-1.png differ
diff --git a/docs/38.0.0/assets/druid-timeline.png b/docs/38.0.0/assets/druid-timeline.png
new file mode 100644
index 000000000..40380e279
Binary files /dev/null and b/docs/38.0.0/assets/druid-timeline.png differ
diff --git a/docs/38.0.0/assets/files/kttm-kafka-supervisor.json b/docs/38.0.0/assets/files/kttm-kafka-supervisor.json
new file mode 100644
index 000000000..2096f9c7c
--- /dev/null
+++ b/docs/38.0.0/assets/files/kttm-kafka-supervisor.json
@@ -0,0 +1,66 @@
+{
+ "type": "kafka",
+ "spec": {
+ "ioConfig": {
+ "type": "kafka",
+ "consumerProperties": {
+ "bootstrap.servers": "localhost:9092"
+ },
+ "topic": "kttm",
+ "inputFormat": {
+ "type": "json"
+ },
+ "useEarliestOffset": true
+ },
+ "tuningConfig": {
+ "type": "kafka"
+ },
+ "dataSchema": {
+ "dataSource": "kttm-kafka-supervisor-api",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "iso"
+ },
+ "dimensionsSpec": {
+ "dimensions": [
+ "session",
+ "number",
+ "client_ip",
+ "language",
+ "adblock_list",
+ "app_version",
+ "path",
+ "loaded_image",
+ "referrer",
+ "referrer_host",
+ "server_ip",
+ "screen",
+ "window",
+ {
+ "type": "long",
+ "name": "session_length"
+ },
+ "timezone",
+ "timezone_offset",
+ {
+ "type": "json",
+ "name": "event"
+ },
+ {
+ "type": "json",
+ "name": "agent"
+ },
+ {
+ "type": "json",
+ "name": "geo_ip"
+ }
+ ]
+ },
+ "granularitySpec": {
+ "queryGranularity": "none",
+ "rollup": false,
+ "segmentGranularity": "day"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/docs/38.0.0/assets/indexing_service.png b/docs/38.0.0/assets/indexing_service.png
new file mode 100644
index 000000000..a4462a413
Binary files /dev/null and b/docs/38.0.0/assets/indexing_service.png differ
diff --git a/docs/38.0.0/assets/multi-stage-query/msq-ui-download-query-results.png b/docs/38.0.0/assets/multi-stage-query/msq-ui-download-query-results.png
new file mode 100644
index 000000000..e428cb2df
Binary files /dev/null and b/docs/38.0.0/assets/multi-stage-query/msq-ui-download-query-results.png differ
diff --git a/docs/38.0.0/assets/multi-stage-query/tutorial-msq-convert.png b/docs/38.0.0/assets/multi-stage-query/tutorial-msq-convert.png
new file mode 100644
index 000000000..f16941af6
Binary files /dev/null and b/docs/38.0.0/assets/multi-stage-query/tutorial-msq-convert.png differ
diff --git a/docs/38.0.0/assets/multi-stage-query/ui-annotated.png b/docs/38.0.0/assets/multi-stage-query/ui-annotated.png
new file mode 100644
index 000000000..5a98c00d1
Binary files /dev/null and b/docs/38.0.0/assets/multi-stage-query/ui-annotated.png differ
diff --git a/docs/38.0.0/assets/multi-stage-query/ui-empty.png b/docs/38.0.0/assets/multi-stage-query/ui-empty.png
new file mode 100644
index 000000000..7c30d5a67
Binary files /dev/null and b/docs/38.0.0/assets/multi-stage-query/ui-empty.png differ
diff --git a/docs/38.0.0/assets/native-queries-01.png b/docs/38.0.0/assets/native-queries-01.png
new file mode 100644
index 000000000..27fd29b63
Binary files /dev/null and b/docs/38.0.0/assets/native-queries-01.png differ
diff --git a/docs/38.0.0/assets/nested-combined-json.png b/docs/38.0.0/assets/nested-combined-json.png
new file mode 100644
index 000000000..f98bfcf53
Binary files /dev/null and b/docs/38.0.0/assets/nested-combined-json.png differ
diff --git a/docs/38.0.0/assets/nested-display-data-types.png b/docs/38.0.0/assets/nested-display-data-types.png
new file mode 100644
index 000000000..2776068ee
Binary files /dev/null and b/docs/38.0.0/assets/nested-display-data-types.png differ
diff --git a/docs/38.0.0/assets/nested-examine-schema.png b/docs/38.0.0/assets/nested-examine-schema.png
new file mode 100644
index 000000000..11769a162
Binary files /dev/null and b/docs/38.0.0/assets/nested-examine-schema.png differ
diff --git a/docs/38.0.0/assets/nested-extract-as-type.png b/docs/38.0.0/assets/nested-extract-as-type.png
new file mode 100644
index 000000000..c54a5eeb6
Binary files /dev/null and b/docs/38.0.0/assets/nested-extract-as-type.png differ
diff --git a/docs/38.0.0/assets/nested-extract-elements.png b/docs/38.0.0/assets/nested-extract-elements.png
new file mode 100644
index 000000000..9f7076b50
Binary files /dev/null and b/docs/38.0.0/assets/nested-extract-elements.png differ
diff --git a/docs/38.0.0/assets/nested-group-aggregate.png b/docs/38.0.0/assets/nested-group-aggregate.png
new file mode 100644
index 000000000..2d1907fe6
Binary files /dev/null and b/docs/38.0.0/assets/nested-group-aggregate.png differ
diff --git a/docs/38.0.0/assets/nested-msq-ingestion-transform.png b/docs/38.0.0/assets/nested-msq-ingestion-transform.png
new file mode 100644
index 000000000..b46fde859
Binary files /dev/null and b/docs/38.0.0/assets/nested-msq-ingestion-transform.png differ
diff --git a/docs/38.0.0/assets/nested-msq-ingestion.png b/docs/38.0.0/assets/nested-msq-ingestion.png
new file mode 100644
index 000000000..0487ee188
Binary files /dev/null and b/docs/38.0.0/assets/nested-msq-ingestion.png differ
diff --git a/docs/38.0.0/assets/nested-parse-deserialize.png b/docs/38.0.0/assets/nested-parse-deserialize.png
new file mode 100644
index 000000000..881a67164
Binary files /dev/null and b/docs/38.0.0/assets/nested-parse-deserialize.png differ
diff --git a/docs/38.0.0/assets/nested-retrieve-json.png b/docs/38.0.0/assets/nested-retrieve-json.png
new file mode 100644
index 000000000..4f5fa0f96
Binary files /dev/null and b/docs/38.0.0/assets/nested-retrieve-json.png differ
diff --git a/docs/38.0.0/assets/nested-return-json.png b/docs/38.0.0/assets/nested-return-json.png
new file mode 100644
index 000000000..9a67aaa71
Binary files /dev/null and b/docs/38.0.0/assets/nested-return-json.png differ
diff --git a/docs/38.0.0/assets/retention-rules.png b/docs/38.0.0/assets/retention-rules.png
new file mode 100644
index 000000000..59061d551
Binary files /dev/null and b/docs/38.0.0/assets/retention-rules.png differ
diff --git a/docs/38.0.0/assets/security-model-1.png b/docs/38.0.0/assets/security-model-1.png
new file mode 100644
index 000000000..55c7f24c5
Binary files /dev/null and b/docs/38.0.0/assets/security-model-1.png differ
diff --git a/docs/38.0.0/assets/security-model-2.png b/docs/38.0.0/assets/security-model-2.png
new file mode 100644
index 000000000..dcb256bac
Binary files /dev/null and b/docs/38.0.0/assets/security-model-2.png differ
diff --git a/docs/38.0.0/assets/segmentPropagation.png b/docs/38.0.0/assets/segmentPropagation.png
new file mode 100644
index 000000000..e1ec82029
Binary files /dev/null and b/docs/38.0.0/assets/segmentPropagation.png differ
diff --git a/docs/38.0.0/assets/services-overview.png b/docs/38.0.0/assets/services-overview.png
new file mode 100644
index 000000000..157ce608e
Binary files /dev/null and b/docs/38.0.0/assets/services-overview.png differ
diff --git a/docs/38.0.0/assets/set-query-context-insert-query.png b/docs/38.0.0/assets/set-query-context-insert-query.png
new file mode 100644
index 000000000..d156597d2
Binary files /dev/null and b/docs/38.0.0/assets/set-query-context-insert-query.png differ
diff --git a/docs/38.0.0/assets/set-query-context-open-context-dialog.png b/docs/38.0.0/assets/set-query-context-open-context-dialog.png
new file mode 100644
index 000000000..765caa0d7
Binary files /dev/null and b/docs/38.0.0/assets/set-query-context-open-context-dialog.png differ
diff --git a/docs/38.0.0/assets/set-query-context-query-view.png b/docs/38.0.0/assets/set-query-context-query-view.png
new file mode 100644
index 000000000..9d25d3c66
Binary files /dev/null and b/docs/38.0.0/assets/set-query-context-query-view.png differ
diff --git a/docs/38.0.0/assets/set-query-context-run-the-query.png b/docs/38.0.0/assets/set-query-context-run-the-query.png
new file mode 100644
index 000000000..27f29f839
Binary files /dev/null and b/docs/38.0.0/assets/set-query-context-run-the-query.png differ
diff --git a/docs/38.0.0/assets/set-query-context-set-context-parameters.png b/docs/38.0.0/assets/set-query-context-set-context-parameters.png
new file mode 100644
index 000000000..17fa11050
Binary files /dev/null and b/docs/38.0.0/assets/set-query-context-set-context-parameters.png differ
diff --git a/docs/38.0.0/assets/spectator-histogram-size-comparison.png b/docs/38.0.0/assets/spectator-histogram-size-comparison.png
new file mode 100644
index 000000000..306f45abd
Binary files /dev/null and b/docs/38.0.0/assets/spectator-histogram-size-comparison.png differ
diff --git a/docs/38.0.0/assets/supervisor-actions.png b/docs/38.0.0/assets/supervisor-actions.png
new file mode 100644
index 000000000..2797cf69e
Binary files /dev/null and b/docs/38.0.0/assets/supervisor-actions.png differ
diff --git a/docs/38.0.0/assets/supervisor-info-dialog.png b/docs/38.0.0/assets/supervisor-info-dialog.png
new file mode 100644
index 000000000..3be424a41
Binary files /dev/null and b/docs/38.0.0/assets/supervisor-info-dialog.png differ
diff --git a/docs/38.0.0/assets/supervisor-view.png b/docs/38.0.0/assets/supervisor-view.png
new file mode 100644
index 000000000..e3100cdd3
Binary files /dev/null and b/docs/38.0.0/assets/supervisor-view.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-00.png b/docs/38.0.0/assets/tutorial-batch-data-loader-00.png
new file mode 100644
index 000000000..793b6c123
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-00.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-01.png b/docs/38.0.0/assets/tutorial-batch-data-loader-01.png
new file mode 100644
index 000000000..2ff1d6398
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-015.png b/docs/38.0.0/assets/tutorial-batch-data-loader-015.png
new file mode 100644
index 000000000..fd588caea
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-015.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-02.png b/docs/38.0.0/assets/tutorial-batch-data-loader-02.png
new file mode 100644
index 000000000..736188cb1
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-03.png b/docs/38.0.0/assets/tutorial-batch-data-loader-03.png
new file mode 100644
index 000000000..74bb8c88f
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-04.png b/docs/38.0.0/assets/tutorial-batch-data-loader-04.png
new file mode 100644
index 000000000..e4237cda8
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-05.png b/docs/38.0.0/assets/tutorial-batch-data-loader-05.png
new file mode 100644
index 000000000..d245dde67
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-06.png b/docs/38.0.0/assets/tutorial-batch-data-loader-06.png
new file mode 100644
index 000000000..285fd57ba
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-06.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-07.png b/docs/38.0.0/assets/tutorial-batch-data-loader-07.png
new file mode 100644
index 000000000..481838d78
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-07.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-08.png b/docs/38.0.0/assets/tutorial-batch-data-loader-08.png
new file mode 100644
index 000000000..b64c5a4e0
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-08.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-09.png b/docs/38.0.0/assets/tutorial-batch-data-loader-09.png
new file mode 100644
index 000000000..bec3085f6
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-09.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-10.png b/docs/38.0.0/assets/tutorial-batch-data-loader-10.png
new file mode 100644
index 000000000..857a5a5c4
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-10.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-11.png b/docs/38.0.0/assets/tutorial-batch-data-loader-11.png
new file mode 100644
index 000000000..bf7e304b8
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-11.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-data-loader-12.png b/docs/38.0.0/assets/tutorial-batch-data-loader-12.png
new file mode 100644
index 000000000..f195b9ca5
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-data-loader-12.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-submit-task-01.png b/docs/38.0.0/assets/tutorial-batch-submit-task-01.png
new file mode 100644
index 000000000..01b91427f
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-submit-task-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-batch-submit-task-02.png b/docs/38.0.0/assets/tutorial-batch-submit-task-02.png
new file mode 100644
index 000000000..ba7caeb22
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-batch-submit-task-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-01.png b/docs/38.0.0/assets/tutorial-compaction-01.png
new file mode 100644
index 000000000..aeb9bf36f
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-02.png b/docs/38.0.0/assets/tutorial-compaction-02.png
new file mode 100644
index 000000000..836d8a7a7
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-03.png b/docs/38.0.0/assets/tutorial-compaction-03.png
new file mode 100644
index 000000000..d51f8f8a8
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-04.png b/docs/38.0.0/assets/tutorial-compaction-04.png
new file mode 100644
index 000000000..46c5b1d26
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-05.png b/docs/38.0.0/assets/tutorial-compaction-05.png
new file mode 100644
index 000000000..e692694af
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-06.png b/docs/38.0.0/assets/tutorial-compaction-06.png
new file mode 100644
index 000000000..55c999f9d
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-06.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-07.png b/docs/38.0.0/assets/tutorial-compaction-07.png
new file mode 100644
index 000000000..661e89784
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-07.png differ
diff --git a/docs/38.0.0/assets/tutorial-compaction-08.png b/docs/38.0.0/assets/tutorial-compaction-08.png
new file mode 100644
index 000000000..6e3f1aa03
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-compaction-08.png differ
diff --git a/docs/38.0.0/assets/tutorial-deletion-01.png b/docs/38.0.0/assets/tutorial-deletion-01.png
new file mode 100644
index 000000000..942f057d7
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-deletion-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-deletion-02.png b/docs/38.0.0/assets/tutorial-deletion-02.png
new file mode 100644
index 000000000..516fdf7fe
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-deletion-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-deletion-03.png b/docs/38.0.0/assets/tutorial-deletion-03.png
new file mode 100644
index 000000000..666ff7a89
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-deletion-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-01.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-01.png
new file mode 100644
index 000000000..7f8d0daac
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-02.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-02.png
new file mode 100644
index 000000000..8475eeba2
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-03.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-03.png
new file mode 100644
index 000000000..dc7400404
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-04.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-04.png
new file mode 100644
index 000000000..570306695
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-05.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-05.png
new file mode 100644
index 000000000..c920f0565
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-06.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-06.png
new file mode 100644
index 000000000..4fb96dd47
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-06.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-07.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-07.png
new file mode 100644
index 000000000..b3013b735
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-07.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-08.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-08.png
new file mode 100644
index 000000000..b1cdd2df1
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-08.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-09.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-09.png
new file mode 100644
index 000000000..e2045ac89
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-09.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-10.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-10.png
new file mode 100644
index 000000000..39eaa3750
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-10.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-11.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-11.png
new file mode 100644
index 000000000..7bd3d9a25
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-11.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-data-loader-12.png b/docs/38.0.0/assets/tutorial-kafka-data-loader-12.png
new file mode 100644
index 000000000..ed952b135
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-data-loader-12.png differ
diff --git a/docs/38.0.0/assets/tutorial-kafka-submit-supervisor-01.png b/docs/38.0.0/assets/tutorial-kafka-submit-supervisor-01.png
new file mode 100644
index 000000000..809c0c673
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-kafka-submit-supervisor-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-01.png b/docs/38.0.0/assets/tutorial-query-01.png
new file mode 100644
index 000000000..99354cbdf
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-02.png b/docs/38.0.0/assets/tutorial-query-02.png
new file mode 100644
index 000000000..4d789f598
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-03.png b/docs/38.0.0/assets/tutorial-query-03.png
new file mode 100644
index 000000000..841d36bfe
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-04.png b/docs/38.0.0/assets/tutorial-query-04.png
new file mode 100644
index 000000000..7c713e367
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-05.png b/docs/38.0.0/assets/tutorial-query-05.png
new file mode 100644
index 000000000..4b3d78d15
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-06.png b/docs/38.0.0/assets/tutorial-query-06.png
new file mode 100644
index 000000000..cb35a0787
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-06.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-07.png b/docs/38.0.0/assets/tutorial-query-07.png
new file mode 100644
index 000000000..aa94d629f
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-07.png differ
diff --git a/docs/38.0.0/assets/tutorial-query-deepstorage-retention-rule.png b/docs/38.0.0/assets/tutorial-query-deepstorage-retention-rule.png
new file mode 100644
index 000000000..9dee37bde
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-query-deepstorage-retention-rule.png differ
diff --git a/docs/38.0.0/assets/tutorial-quickstart-01.png b/docs/38.0.0/assets/tutorial-quickstart-01.png
new file mode 100644
index 000000000..649708b7c
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-quickstart-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-quickstart-02.png b/docs/38.0.0/assets/tutorial-quickstart-02.png
new file mode 100644
index 000000000..5edec67c3
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-quickstart-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-quickstart-03.png b/docs/38.0.0/assets/tutorial-quickstart-03.png
new file mode 100644
index 000000000..917f25d04
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-quickstart-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-quickstart-04.png b/docs/38.0.0/assets/tutorial-quickstart-04.png
new file mode 100644
index 000000000..e847ef550
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-quickstart-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-quickstart-05.png b/docs/38.0.0/assets/tutorial-quickstart-05.png
new file mode 100644
index 000000000..da3ed0dfa
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-quickstart-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-00.png b/docs/38.0.0/assets/tutorial-retention-00.png
new file mode 100644
index 000000000..a3f84a9fe
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-00.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-01.png b/docs/38.0.0/assets/tutorial-retention-01.png
new file mode 100644
index 000000000..35a97c262
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-02.png b/docs/38.0.0/assets/tutorial-retention-02.png
new file mode 100644
index 000000000..f38fad0d2
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-03.png b/docs/38.0.0/assets/tutorial-retention-03.png
new file mode 100644
index 000000000..256836a2d
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-04.png b/docs/38.0.0/assets/tutorial-retention-04.png
new file mode 100644
index 000000000..d39495f87
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-05.png b/docs/38.0.0/assets/tutorial-retention-05.png
new file mode 100644
index 000000000..638a752fa
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-retention-06.png b/docs/38.0.0/assets/tutorial-retention-06.png
new file mode 100644
index 000000000..f47cbffbb
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-retention-06.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-aggregate-query.png b/docs/38.0.0/assets/tutorial-sql-aggregate-query.png
new file mode 100644
index 000000000..0ffbff60e
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-aggregate-query.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-auto-queries.png b/docs/38.0.0/assets/tutorial-sql-auto-queries.png
new file mode 100644
index 000000000..dc04a8de6
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-auto-queries.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-count-distinct-help.png b/docs/38.0.0/assets/tutorial-sql-count-distinct-help.png
new file mode 100644
index 000000000..5327972d2
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-count-distinct-help.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-count-distinct.png b/docs/38.0.0/assets/tutorial-sql-count-distinct.png
new file mode 100644
index 000000000..5fb9b2ae0
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-count-distinct.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-demo-queries.png b/docs/38.0.0/assets/tutorial-sql-demo-queries.png
new file mode 100644
index 000000000..16fc040a6
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-demo-queries.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-query-plan.png b/docs/38.0.0/assets/tutorial-sql-query-plan.png
new file mode 100644
index 000000000..03f3c3cc6
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-query-plan.png differ
diff --git a/docs/38.0.0/assets/tutorial-sql-result-column-actions.png b/docs/38.0.0/assets/tutorial-sql-result-column-actions.png
new file mode 100644
index 000000000..16518d4bf
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-sql-result-column-actions.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-01.png b/docs/38.0.0/assets/tutorial-theta-01.png
new file mode 100644
index 000000000..2411fbf19
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-01.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-02.png b/docs/38.0.0/assets/tutorial-theta-02.png
new file mode 100644
index 000000000..ce849fd36
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-02.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-03.png b/docs/38.0.0/assets/tutorial-theta-03.png
new file mode 100644
index 000000000..316bf7f0b
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-03.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-04.png b/docs/38.0.0/assets/tutorial-theta-04.png
new file mode 100644
index 000000000..21f383af6
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-04.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-05.png b/docs/38.0.0/assets/tutorial-theta-05.png
new file mode 100644
index 000000000..ec2c8df6d
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-05.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-06.png b/docs/38.0.0/assets/tutorial-theta-06.png
new file mode 100644
index 000000000..4048aa238
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-06.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-07.png b/docs/38.0.0/assets/tutorial-theta-07.png
new file mode 100644
index 000000000..369b5914a
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-07.png differ
diff --git a/docs/38.0.0/assets/tutorial-theta-08.png b/docs/38.0.0/assets/tutorial-theta-08.png
new file mode 100644
index 000000000..59a6bc051
Binary files /dev/null and b/docs/38.0.0/assets/tutorial-theta-08.png differ
diff --git a/docs/38.0.0/assets/web-console-0.7-tasks.png b/docs/38.0.0/assets/web-console-0.7-tasks.png
new file mode 100644
index 000000000..80080ba8e
Binary files /dev/null and b/docs/38.0.0/assets/web-console-0.7-tasks.png differ
diff --git a/docs/38.0.0/assets/web-console-01-home-view.png b/docs/38.0.0/assets/web-console-01-home-view.png
new file mode 100644
index 000000000..39b6e8a1a
Binary files /dev/null and b/docs/38.0.0/assets/web-console-01-home-view.png differ
diff --git a/docs/38.0.0/assets/web-console-02-data-loader-1.png b/docs/38.0.0/assets/web-console-02-data-loader-1.png
new file mode 100644
index 000000000..ecd18c01f
Binary files /dev/null and b/docs/38.0.0/assets/web-console-02-data-loader-1.png differ
diff --git a/docs/38.0.0/assets/web-console-03-data-loader-2.png b/docs/38.0.0/assets/web-console-03-data-loader-2.png
new file mode 100644
index 000000000..bfb7be59c
Binary files /dev/null and b/docs/38.0.0/assets/web-console-03-data-loader-2.png differ
diff --git a/docs/38.0.0/assets/web-console-04-datasources.png b/docs/38.0.0/assets/web-console-04-datasources.png
new file mode 100644
index 000000000..fab3cec45
Binary files /dev/null and b/docs/38.0.0/assets/web-console-04-datasources.png differ
diff --git a/docs/38.0.0/assets/web-console-05-retention.png b/docs/38.0.0/assets/web-console-05-retention.png
new file mode 100644
index 000000000..96278525a
Binary files /dev/null and b/docs/38.0.0/assets/web-console-05-retention.png differ
diff --git a/docs/38.0.0/assets/web-console-06-segments.png b/docs/38.0.0/assets/web-console-06-segments.png
new file mode 100644
index 000000000..9e9e9ab98
Binary files /dev/null and b/docs/38.0.0/assets/web-console-06-segments.png differ
diff --git a/docs/38.0.0/assets/web-console-07-supervisors.png b/docs/38.0.0/assets/web-console-07-supervisors.png
new file mode 100644
index 000000000..70391bd64
Binary files /dev/null and b/docs/38.0.0/assets/web-console-07-supervisors.png differ
diff --git a/docs/38.0.0/assets/web-console-08-supervisor-status.png b/docs/38.0.0/assets/web-console-08-supervisor-status.png
new file mode 100644
index 000000000..1bcfccdfe
Binary files /dev/null and b/docs/38.0.0/assets/web-console-08-supervisor-status.png differ
diff --git a/docs/38.0.0/assets/web-console-09-task-status.png b/docs/38.0.0/assets/web-console-09-task-status.png
new file mode 100644
index 000000000..100e8ada0
Binary files /dev/null and b/docs/38.0.0/assets/web-console-09-task-status.png differ
diff --git a/docs/38.0.0/assets/web-console-10-servers.png b/docs/38.0.0/assets/web-console-10-servers.png
new file mode 100644
index 000000000..a3e0084e1
Binary files /dev/null and b/docs/38.0.0/assets/web-console-10-servers.png differ
diff --git a/docs/38.0.0/assets/web-console-11-query-sql.png b/docs/38.0.0/assets/web-console-11-query-sql.png
new file mode 100644
index 000000000..a144774f4
Binary files /dev/null and b/docs/38.0.0/assets/web-console-11-query-sql.png differ
diff --git a/docs/38.0.0/assets/web-console-12-query-rune.png b/docs/38.0.0/assets/web-console-12-query-rune.png
new file mode 100644
index 000000000..8c5e27056
Binary files /dev/null and b/docs/38.0.0/assets/web-console-12-query-rune.png differ
diff --git a/docs/38.0.0/assets/web-console-13-lookups.png b/docs/38.0.0/assets/web-console-13-lookups.png
new file mode 100644
index 000000000..fa0bd0b06
Binary files /dev/null and b/docs/38.0.0/assets/web-console-13-lookups.png differ
diff --git a/docs/38.0.0/comparisons/druid-vs-elasticsearch.md b/docs/38.0.0/comparisons/druid-vs-elasticsearch.md
new file mode 100644
index 000000000..82752aa7a
--- /dev/null
+++ b/docs/38.0.0/comparisons/druid-vs-elasticsearch.md
@@ -0,0 +1,39 @@
+---
+id: druid-vs-elasticsearch
+title: "Apache Druid vs Elasticsearch"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+We are not experts on search systems, if anything is incorrect about our portrayal, please let us know on the mailing list or via some other means.
+
+Elasticsearch is a search system based on Apache Lucene. It provides full text search for schema-free documents
+and provides access to raw event level data. Elasticsearch is increasingly adding more support for analytics and aggregations.
+[Some members of the community](https://groups.google.com/forum/#!msg/druid-development/nlpwTHNclj8/sOuWlKOzPpYJ) have pointed out
+the resource requirements for data ingestion and aggregation in Elasticsearch is much higher than those of Druid.
+
+Elasticsearch also does not support data summarization/roll-up at ingestion time, which can compact the data that needs to be
+stored up to 100x with real-world data sets. This leads to Elasticsearch having greater storage requirements.
+
+Druid focuses on OLAP work flows. Druid is optimized for high performance (fast aggregation and ingestion) at low cost,
+and supports a wide range of analytic operations. Druid has some basic search support for structured event data, but does not support
+full text search. Druid also does not support completely unstructured data. Measures must be defined in a Druid schema such that
+summarization/roll-up can be done.
diff --git a/docs/38.0.0/comparisons/druid-vs-key-value.md b/docs/38.0.0/comparisons/druid-vs-key-value.md
new file mode 100644
index 000000000..57f3dec66
--- /dev/null
+++ b/docs/38.0.0/comparisons/druid-vs-key-value.md
@@ -0,0 +1,46 @@
+---
+id: druid-vs-key-value
+title: "Apache Druid vs. Key/Value Stores (HBase/Cassandra/OpenTSDB)"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Druid is highly optimized for scans and aggregations, it supports arbitrarily deep drill downs into data sets. This same functionality
+is supported in key/value stores in 2 ways:
+
+1. Pre-compute all permutations of possible user queries
+2. Range scans on event data
+
+When pre-computing results, the key is the exact parameters of the query, and the value is the result of the query.
+The queries return extremely quickly, but at the cost of flexibility, as ad-hoc exploratory queries are not possible with
+pre-computing every possible query permutation. Pre-computing all permutations of all ad-hoc queries leads to result sets
+that grow exponentially with the number of columns of a data set, and pre-computing queries for complex real-world data sets
+can require hours of pre-processing time.
+
+The other approach to using key/value stores for aggregations to use the dimensions of an event as the key and the event measures as the value.
+Aggregations are done by issuing range scans on this data. Timeseries specific databases such as OpenTSDB use this approach.
+One of the limitations here is that the key/value storage model does not have indexes for any kind of filtering other than prefix ranges,
+which can be used to filter a query down to a metric and time range, but cannot resolve complex predicates to narrow the exact data to scan.
+When the number of rows to scan gets large, this limitation can greatly reduce performance. It is also harder to achieve good
+locality with key/value stores because most don’t support pushing down aggregates to the storage layer.
+
+For arbitrary exploration of data (flexible data filtering), Druid's custom column format enables ad-hoc queries without pre-computation. The format
+also enables fast scans on columns, which is important for good aggregation performance.
diff --git a/docs/38.0.0/comparisons/druid-vs-kudu.md b/docs/38.0.0/comparisons/druid-vs-kudu.md
new file mode 100644
index 000000000..b992a1633
--- /dev/null
+++ b/docs/38.0.0/comparisons/druid-vs-kudu.md
@@ -0,0 +1,39 @@
+---
+id: druid-vs-kudu
+title: "Apache Druid vs Kudu"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Kudu's storage format enables single row updates, whereas updates to existing Druid segments requires recreating the segment, so theoretically
+the process for updating old values should be higher latency in Druid. However, the requirements in Kudu for maintaining extra head space to store
+updates as well as organizing data by id instead of time has the potential to introduce some extra latency and accessing
+of data that is not needed to answer a query at query time.
+
+Druid summarizes/rollups up data at ingestion time, which in practice reduces the raw data that needs to be
+stored significantly (up to 40 times on average), and increases performance of scanning raw data significantly.
+Druid segments also contain bitmap indexes for fast filtering, which Kudu does not currently support.
+Druid's segment architecture is heavily geared towards fast aggregates and filters, and for OLAP workflows. Appends are very
+fast in Druid, whereas updates of older data are higher latency. This is by design as the data Druid is good for is typically event data,
+and does not need to be updated too frequently. Kudu supports arbitrary primary keys with uniqueness constraints, and
+efficient lookup by ranges of those keys. Kudu chooses not to include the execution engine, but supports sufficient
+operations so as to allow node-local processing from the execution engines. This means that Kudu can support multiple frameworks on the same data (e.g., MR, Spark, and SQL).
+Druid includes its own query layer that allows it to push down aggregations and computations directly to data processes for faster query processing.
diff --git a/docs/38.0.0/comparisons/druid-vs-redshift.md b/docs/38.0.0/comparisons/druid-vs-redshift.md
new file mode 100644
index 000000000..3e2c7b9ea
--- /dev/null
+++ b/docs/38.0.0/comparisons/druid-vs-redshift.md
@@ -0,0 +1,62 @@
+---
+id: druid-vs-redshift
+title: "Apache Druid vs Redshift"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+### How does Druid compare to Redshift?
+
+In terms of drawing a differentiation, Redshift started out as ParAccel (Actian), which Amazon is licensing and has since heavily modified.
+
+Aside from potential performance differences, there are some functional differences:
+
+### Real-time data ingestion
+
+Because Druid is optimized to provide insight against massive quantities of streaming data; it is able to load and aggregate data in real-time.
+
+Generally traditional data warehouses including column stores work only with batch ingestion and are not optimal for streaming data in regularly.
+
+### Druid is a read oriented analytical data store
+
+Druid’s write semantics are not as fluid and does not support full joins (we support large table to small table joins). Redshift provides full SQL support including joins and insert/update statements.
+
+### Data distribution model
+
+Druid’s data distribution is segment-based and leverages a highly available "deep" storage such as S3 or HDFS. Scaling up (or down) does not require massive copy actions or downtime; in fact, losing any number of Historical processes does not result in data loss because new Historical processes can always be brought up by reading data from "deep" storage.
+
+To contrast, ParAccel’s data distribution model is hash-based. Expanding the cluster requires re-hashing the data across the nodes, making it difficult to perform without taking downtime. Amazon’s Redshift works around this issue with a multi-step process:
+
+* set cluster into read-only mode
+* copy data from cluster to new cluster that exists in parallel
+* redirect traffic to new cluster
+
+### Replication strategy
+
+Druid employs segment-level data distribution meaning that more processes can be added and rebalanced without having to perform a staged swap. The replication strategy also makes all replicas available for querying. Replication is done automatically and without any impact to performance.
+
+ParAccel’s hash-based distribution generally means that replication is conducted via hot spares. This puts a numerical limit on the number of nodes you can lose without losing data, and this replication strategy often does not allow the hot spare to help share query load.
+
+### Indexing strategy
+
+Along with column oriented structures, Druid uses indexing structures to speed up query execution when a filter is provided. Indexing structures do increase storage overhead (and make it more difficult to allow for mutation), but they also significantly speed up queries.
+
+ParAccel does not appear to employ indexing strategies.
diff --git a/docs/38.0.0/comparisons/druid-vs-spark.md b/docs/38.0.0/comparisons/druid-vs-spark.md
new file mode 100644
index 000000000..4d3a6b43d
--- /dev/null
+++ b/docs/38.0.0/comparisons/druid-vs-spark.md
@@ -0,0 +1,42 @@
+---
+id: druid-vs-spark
+title: "Apache Druid vs Spark"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Druid and Spark are complementary solutions as Druid can be used to accelerate OLAP queries in Spark.
+
+Spark is a general cluster computing framework initially designed around the concept of Resilient Distributed Datasets (RDDs).
+RDDs enable data reuse by persisting intermediate results
+in memory and enable Spark to provide fast computations for iterative algorithms.
+This is especially beneficial for certain work flows such as machine
+learning, where the same operation may be applied over and over
+again until some result is converged upon. The generality of Spark makes it very suitable as an engine to process (clean or transform) data.
+Although Spark provides the ability to query data through Spark SQL, much like Hadoop, the query latencies are not specifically targeted to be interactive (sub-second).
+
+Druid's focus is on extremely low latency queries, and is ideal for powering applications used by thousands of users, and where each query must
+return fast enough such that users can interactively explore through data. Druid fully indexes all data, and can act as a middle layer between Spark and your application.
+One typical setup seen in production is to process data in Spark, and load the processed data into Druid for faster access.
+
+For more information about using Druid and Spark together, including benchmarks of the two systems, please see:
+
+https://www.linkedin.com/pulse/combining-druid-spark-interactive-flexible-analytics-scale-butani
diff --git a/docs/38.0.0/comparisons/druid-vs-sql-on-hadoop.md b/docs/38.0.0/comparisons/druid-vs-sql-on-hadoop.md
new file mode 100644
index 000000000..00e447312
--- /dev/null
+++ b/docs/38.0.0/comparisons/druid-vs-sql-on-hadoop.md
@@ -0,0 +1,82 @@
+---
+id: druid-vs-sql-on-hadoop
+title: "Apache Druid vs SQL-on-Hadoop"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+SQL-on-Hadoop engines provide an
+execution engine for various data formats and data stores, and
+many can be made to push down computations down to Druid, while providing a SQL interface to Druid.
+
+For a direct comparison between the technologies and when to only use one or the other, things basically comes down to your
+product requirements and what the systems were designed to do.
+
+Druid was designed to
+
+1. be an always on service
+1. ingest data in real-time
+1. handle slice-n-dice style ad-hoc queries
+
+SQL-on-Hadoop engines generally sidestep Map/Reduce, instead querying data directly from HDFS or, in some cases, other storage systems.
+Some of these engines (including Impala and Presto) can be co-located with HDFS data nodes and coordinate with them to achieve data locality for queries.
+What does this mean? We can talk about it in terms of three general areas
+
+1. Queries
+1. Data Ingestion
+1. Query Flexibility
+
+### Queries
+
+Druid segments stores data in a custom column format. Segments are scanned directly as part of queries and each Druid server
+calculates a set of results that are eventually merged at the Broker level. This means the data that is transferred between servers
+are queries and results, and all computation is done internally as part of the Druid servers.
+
+Most SQL-on-Hadoop engines are responsible for query planning and execution for underlying storage layers and storage formats.
+They are processes that stay on even if there is no query running (eliminating the JVM startup costs from Hadoop MapReduce).
+Some (Impala/Presto) SQL-on-Hadoop engines have daemon processes that can be run where the data is stored, virtually eliminating network transfer costs. There is still
+some latency overhead (e.g. serialization/deserialization time) associated with pulling data from the underlying storage layer into the computation layer. We are unaware of exactly
+how much of a performance impact this makes.
+
+### Data Ingestion
+
+Druid is built to allow for real-time ingestion of data. You can ingest data and query it immediately upon ingestion,
+the latency between how quickly the event is reflected in the data is dominated by how long it takes to deliver the event to Druid.
+
+SQL-on-Hadoop, being based on data in HDFS or some other backing store, are limited in their data ingestion rates by the
+rate at which that backing store can make data available. Generally, the backing store is the biggest bottleneck for
+how quickly data can become available.
+
+### Query Flexibility
+
+Druid's query language is fairly low level and maps to how Druid operates internally. Although Druid can be combined with a high level query
+planner to support most SQL queries and analytic SQL queries (minus joins among large tables),
+base Druid is less flexible than SQL-on-Hadoop solutions for generic processing.
+
+SQL-on-Hadoop support SQL style queries with full joins.
+
+## Druid vs Parquet
+
+Parquet is a column storage format that is designed to work with SQL-on-Hadoop engines. Parquet doesn't have a query execution engine, and instead
+relies on external sources to pull data out of it.
+
+Druid's storage format is highly optimized for linear scans. Although Druid has support for nested data, Parquet's storage format is much
+more hierarchical, and is more designed for binary chunking. In theory, this should lead to faster scans in Druid.
diff --git a/docs/latest/configuration/extensions.md b/docs/38.0.0/configuration/extensions.md
similarity index 95%
copy from docs/latest/configuration/extensions.md
copy to docs/38.0.0/configuration/extensions.md
index 6c802739f..e3c877f3b 100644
--- a/docs/latest/configuration/extensions.md
+++ b/docs/38.0.0/configuration/extensions.md
@@ -36,7 +36,7 @@ Core extensions are maintained by Druid committers.
|Name|Description|Docs|
|----|-----------|----|
|druid-avro-extensions|Support for data in Apache Avro data format.|[link](../development/extensions-core/avro.md)|
-|druid-azure-extensions|Microsoft Azure deep storage.|[link](../development/extensions-core/azure.md)|
+|druid-azure-extensions|Microsoft® Azure deep storage.|[link](../development/extensions-core/azure.md)|
|druid-basic-security|Support for Basic HTTP authentication and role-based access control.|[link](../development/extensions-core/druid-basic-security.md)|
|druid-bloom-filter|Support for providing Bloom filters in druid queries.|[link](../development/extensions-core/bloom-filter.md)|
|druid-catalog|This extension allows users to configure, update, retrieve, and manage metadata stored in Druid's catalog. |[link](../development/extensions-core/catalog.md)|
@@ -45,14 +45,13 @@ Core extensions are maintained by Druid committers.
|druid-hdfs-storage|HDFS deep storage.|[link](../development/extensions-core/hdfs.md)|
|druid-histogram|Approximate histograms and quantiles aggregator. Deprecated, please use the [DataSketches quantiles aggregator](../development/extensions-core/datasketches-quantiles.md) from the `druid-datasketches` extension instead.|[link](../development/extensions-core/approximate-histograms.md)|
|druid-kafka-extraction-namespace|Apache Kafka-based namespaced lookup. Requires namespace lookup extension.|[link](../querying/kafka-extraction-namespace.md)|
-|druid-kafka-indexing-service|Supervised exactly-once Apache Kafka ingestion for the indexing service.|[link](../ingestion/kafka-ingestion.md)|
+|druid-kafka-indexing-service|Supervised exactly-once Apache Kafka® ingestion for the indexing service.|[link](../ingestion/kafka-ingestion.md)|
|druid-kinesis-indexing-service|Supervised exactly-once Kinesis ingestion for the indexing service.|[link](../ingestion/kinesis-ingestion.md)|
|druid-kerberos|Kerberos authentication for druid processes.|[link](../development/extensions-core/druid-kerberos.md)|
|druid-lookups-cached-global|A module for [lookups](../querying/lookups.md) providing a jvm-global eager caching for lookups. It provides JDBC and URI implementations for fetching lookup data.|[link](../querying/lookups-cached-global.md)|
|druid-lookups-cached-single| Per lookup caching module to support the use cases where a lookup need to be isolated from the global pool of lookups |[link](../development/extensions-core/druid-lookups.md)|
-|druid-multi-stage-query| Support for the multi-stage query architecture for Apache Druid and the multi-stage query task engine.|[link](../multi-stage-query/index.md)|
|druid-orc-extensions|Support for data in Apache ORC data format.|[link](../development/extensions-core/orc.md)|
-|druid-parquet-extensions|Support for data in Apache Parquet data format. Requires druid-avro-extensions to be loaded.|[link](../development/extensions-core/parquet.md)|
+|druid-parquet-extensions|Support for data in Apache® Parquet data format. Requires druid-avro-extensions to be loaded.|[link](../development/extensions-core/parquet.md)|
|druid-protobuf-extensions| Support for data in Protobuf data format.|[link](../development/extensions-core/protobuf.md)|
|druid-s3-extensions|Interfacing with data in Amazon S3, and using S3 as deep storage.|[link](../development/extensions-core/s3.md)|
|druid-ec2-extensions|Interfacing with AWS EC2 for autoscaling middle managers|UNDOCUMENTED|
@@ -62,7 +61,7 @@ Core extensions are maintained by Druid committers.
|postgresql-metadata-storage|PostgreSQL metadata store.|[link](../development/extensions-core/postgresql.md)|
|simple-client-sslcontext|Simple SSLContext provider module to be used by Druid's internal HttpClient when talking to other Druid processes over HTTPS.|[link](../development/extensions-core/simple-client-sslcontext.md)|
|druid-pac4j|OpenID Connect authentication for druid processes.|[link](../development/extensions-core/druid-pac4j.md)|
-|druid-kubernetes-extensions|Druid cluster deployment on Kubernetes without Zookeeper.|[link](../development/extensions-core/kubernetes.md)|
+|druid-kubernetes-extensions|Druid cluster deployment on Kubernetes® without Zookeeper.|[link](../development/extensions-core/kubernetes.md)|
|druid-kubernetes-overlord-extensions|Support for launching tasks in k8s without Middle Managers|[link](../development/extensions-core/k8s-jobs.md)|
## Community extensions
@@ -94,6 +93,7 @@ All of these community extensions can be downloaded using [pull-deps](../operati
|graphite-emitter|Graphite metrics emitter|[link](../development/extensions-contrib/graphite.md)|
|statsd-emitter|StatsD metrics emitter|[link](../development/extensions-contrib/statsd.md)|
|kafka-emitter|Kafka metrics emitter|[link](../development/extensions-contrib/kafka-emitter.md)|
+|openlineage-emitter|OpenLineage data lineage emitter|[link](../development/extensions-contrib/openlineage-emitter.md)|
|druid-thrift-extensions|Support thrift ingestion |[link](../development/extensions-contrib/thrift.md)|
|druid-opentsdb-emitter|OpenTSDB metrics emitter |[link](../development/extensions-contrib/opentsdb-emitter.md)|
|druid-moving-average-query|Support for [Moving Average](https://en.wikipedia.org/wiki/Moving_average) and other Aggregate [Window Functions](https://en.wikibooks.org/wiki/Structured_Query_Language/Window_functions) in Druid queries.|[link](../development/extensions-contrib/moving-average-query.md)|
@@ -104,7 +104,7 @@ All of these community extensions can be downloaded using [pull-deps](../operati
|prometheus-emitter|Exposes [Druid metrics](../operations/metrics.md) for [Prometheus](https://prometheus.io/)|[link](../development/extensions-contrib/prometheus.md)|
|druid-spectator-histogram|Support for efficient approximate percentile queries|[link](../development/extensions-contrib/spectator-histogram.md)|
|druid-rabbit-indexing-service|Support for creating and managing [RabbitMQ](https://www.rabbitmq.com/) indexing tasks|[link](../development/extensions-contrib/rabbit-stream-ingestion.md)|
-|druid-ranger-security|Support for access control through Apache Ranger.|[link](../development/extensions-contrib/druid-ranger-security.md)|
+|druid-ranger-security|Support for access control through Apache® Ranger.|[link](../development/extensions-contrib/druid-ranger-security.md)|
## Promoting community extensions to core extensions
diff --git a/docs/38.0.0/configuration/human-readable-byte.md b/docs/38.0.0/configuration/human-readable-byte.md
new file mode 100644
index 000000000..0f412b69a
--- /dev/null
+++ b/docs/38.0.0/configuration/human-readable-byte.md
@@ -0,0 +1,98 @@
+---
+id: human-readable-byte
+title: "Human-readable Byte Configuration Reference"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+This page documents configuration properties related to bytes.
+
+These properties can be configured through 2 ways:
+1. a simple number in bytes
+2. a number with a unit suffix
+
+## A number in bytes
+
+Given that cache size is 3G, there's a configuration as below
+
+```properties
+# 3G bytes = 3_000_000_000 bytes
+druid.cache.sizeInBytes=3000000000
+```
+
+
+## A number with a unit suffix
+
+When you have to put a large number for some configuration as above, it is easy to make a mistake such as extra or missing 0s. Druid supports a better way, a number with a unit suffix.
+
+Given a disk of 1T, the configuration can be
+
+```properties
+druid.segmentCache.locations=[{"path":"/segment-cache-00","maxSize":"1t"},{"path":"/segment-cache-01","maxSize":"1200g"}]
+```
+
+Note: in above example, both `1t` and `1T` are acceptable since it's case-insensitive.
+Also, only integers are valid as the number part. For example, you can't replace `1200g` with `1.2t`.
+
+### Supported Units
+In the world of computer, a unit like `K` is ambiguous. It means 1000 or 1024 in different contexts, for more information please see [Here](https://en.wikipedia.org/wiki/Binary_prefix).
+
+To make it clear, the base of units are defined in Druid as below
+
+| Unit | Description | Base |
+|---|---|---|
+| K | Kilo Decimal Byte | 1_000 |
+| M | Mega Decimal Byte | 1_000_000 |
+| G | Giga Decimal Byte | 1_000_000_000 |
+| T | Tera Decimal Byte | 1_000_000_000_000 |
+| P | Peta Decimal Byte | 1_000_000_000_000_000 |
+| Ki | Kilo Binary Byte | 1024 |
+| Mi | Mega Binary Byte | 1024 * 1024 |
+| Gi | Giga Binary Byte | 1024 * 1024 * 1024 |
+| Ti | Tera Binary Byte | 1024 * 1024 * 1024 * 1024 |
+| Pi | Peta Binary Byte | 1024 * 1024 * 1024 * 1024 * 1024 |
+| KiB | Kilo Binary Byte | 1024 |
+| MiB | Mega Binary Byte | 1024 * 1024 |
+| GiB | Giga Binary Byte | 1024 * 1024 * 1024 |
+| TiB | Tera Binary Byte | 1024 * 1024 * 1024 * 1024 |
+| PiB | Peta Binary Byte | 1024 * 1024 * 1024 * 1024 * 1024 |
+
+Unit is case-insensitive. `k`, `kib`, `ki`, `KiB`, `Ki`, `kiB` are all acceptable.
+
+Here are some examples
+
+```properties
+# 1G bytes = 1_000_000_000 bytes
+druid.cache.sizeInBytes=1g
+```
+
+```properties
+# 256MiB bytes = 256 * 1024 * 1024 bytes
+druid.cache.sizeInBytes=256MiB
+```
+
+```properties
+# 256Mi = 256MiB = 256 * 1024 * 1024 bytes
+druid.cache.sizeInBytes=256Mi
+```
+
+
+
diff --git a/docs/latest/configuration/index.md b/docs/38.0.0/configuration/index.md
similarity index 95%
copy from docs/latest/configuration/index.md
copy to docs/38.0.0/configuration/index.md
index 08486e21a..308b523a0 100644
--- a/docs/latest/configuration/index.md
+++ b/docs/38.0.0/configuration/index.md
@@ -154,29 +154,8 @@ Druid interacts with ZooKeeper through a set of standard path configurations. We
|Property|Description|Default|
|--------|-----------|-------|
|`druid.zk.paths.base`|Base ZooKeeper path.|`/druid`|
-|`druid.zk.paths.propertiesPath`|ZooKeeper properties path.|`${druid.zk.paths.base}/properties`|
-|`druid.zk.paths.announcementsPath`|Druid service announcement path.|`${druid.zk.paths.base}/announcements`|
-|`druid.zk.paths.liveSegmentsPath`|Current path for where Druid services announce their segments.|`${druid.zk.paths.base}/segments`|
|`druid.zk.paths.coordinatorPath`|Used by the Coordinator for leader election.|`${druid.zk.paths.base}/coordinator`|
-The indexing service also uses its own set of paths. These configs can be included in the common configuration.
-
-|Property|Description|Default|
-|--------|-----------|-------|
-|`druid.zk.paths.indexer.base`|Base ZooKeeper path for |`${druid.zk.paths.base}/indexer`|
-|`druid.zk.paths.indexer.announcementsPath`|Middle Managers announce themselves here.|`${druid.zk.paths.indexer.base}/announcements`|
-|`druid.zk.paths.indexer.tasksPath`|Used to assign tasks to Middle Managers.|`${druid.zk.paths.indexer.base}/tasks`|
-|`druid.zk.paths.indexer.statusPath`|Parent path for announcement of task statuses.|`${druid.zk.paths.indexer.base}/status`|
-
-If `druid.zk.paths.base` and `druid.zk.paths.indexer.base` are both set, and none of the other `druid.zk.paths.*` or `druid.zk.paths.indexer.*` values are set, then the other properties will be evaluated relative to their respective `base`.
-For example, if `druid.zk.paths.base` is set to `/druid1` and `druid.zk.paths.indexer.base` is set to `/druid2` then `druid.zk.paths.announcementsPath` will default to `/druid1/announcements` while `druid.zk.paths.indexer.announcementsPath` will default to `/druid2/announcements`.
-
-The following path is used for service discovery. It is **not** affected by `druid.zk.paths.base` and **must** be specified separately.
-
-|Property|Description|Default|
-|--------|-----------|-------|
-|`druid.discovery.curator.path`|Services announce themselves under this ZooKeeper path.|`/druid/discovery`|
-
### TLS
#### General configuration
@@ -239,7 +218,8 @@ values for the above mentioned configs among others provided by Java implementat
|`druid.escalator.type`|String|Type of the Escalator that should be used for internal Druid communications. This Escalator must use an authentication scheme that is supported by an Authenticator in `druid.auth.authenticatorChain`.|`noop`|no|
|`druid.auth.authorizers`|JSON List of Strings|List of Authorizer type names |["allowAll"]|no|
|`druid.auth.unsecuredPaths`| List of Strings|List of paths for which security checks will not be performed. All requests to these paths will be allowed.|[]|no|
-|`druid.auth.allowUnauthenticatedHttpOptions`|Boolean|If true, skip authentication checks for HTTP OPTIONS requests. This is needed for certain use cases, such as supporting CORS pre-flight requests. Note that disabling authentication checks for OPTIONS requests will allow unauthenticated users to determine what Druid endpoints are valid (by checking if the OPTIONS request returns a 200 instead of 404), so enabling this option may reveal information about server configuration, including [...]
+|`druid.auth.allowUnauthenticatedHttpOptions`|Boolean|If true, skip authentication checks for HTTP OPTIONS requests. This is needed for certain use cases, such as supporting CORS pre-flight requests. Note that disabling authentication checks for OPTIONS requests will allow unauthenticated users to determine what Druid endpoints are valid (by checking if the OPTIONS request returns a 200 instead of 404), so enabling this option may reveal information about server configuration, including [...]
+|`druid.auth.emitAuthMetrics`|Boolean|If true, emit service metrics for authorization events. When enabled, Druid emits `auth/forbidden` when access is denied and `auth/exception` when an internal authorization error occurs. See [Security metrics](#security) for details.|false|no|
For more information, please see [Authentication and Authorization](../operations/auth.md).
@@ -648,27 +628,6 @@ This config is used to find the [Coordinator](../design/coordinator.md) using Cu
|--------|-----------|-------|
|`druid.selectors.coordinator.serviceName`|The druid.service name of the Coordinator service. To start the Coordinator with a different name, set it with this property. |druid/coordinator|
-### Announcing segments
-
-You can configure how to announce and unannounce Znodes in ZooKeeper (using Curator). For normal operations you do not need to override any of these configs.
-
-#### Batch data segment announcer
-
-In current Druid, multiple data segments may be announced under the same Znode.
-
-|Property|Description|Default|
-|--------|-----------|-------|
-|`druid.announcer.segmentsPerNode`|Each Znode contains info for up to this many segments.|50|
-|`druid.announcer.maxBytesPerNode`|Max byte size for Znode. Allowed range is [1024, 1048576].|524288|
-|`druid.announcer.skipDimensionsAndMetrics`|Skip Dimensions and Metrics list from segment announcements. NOTE: Enabling this will also remove the dimensions and metrics list from Coordinator and Broker endpoints.|false|
-|`druid.announcer.skipLoadSpec`|Skip segment LoadSpec from segment announcements. NOTE: Enabling this will also remove the loadspec from Coordinator and Broker endpoints.|false|
-
-If you want to turn off the batch data segment announcer, you can add a property to skip announcing segments. **You do not want to enable this config if you have any services using `batch` for `druid.serverview.type`**
-
-|Property|Description|Default|
-|--------|-----------|-------|
-|`druid.announcer.skipSegmentAnnouncementOnZk`|Skip announcing segments to ZooKeeper. Note that the batch server view will not work if this is set to true.|false|
-
### JavaScript
Druid supports dynamic runtime extension through JavaScript functions. This functionality can be configured through
@@ -682,6 +641,18 @@ the following properties.
JavaScript-based functionality is disabled by default. Please refer to the Druid [JavaScript programming guide](../development/javascript.md) for guidelines about using Druid's JavaScript functionality, including instructions on how to enable it.
:::
+### Expression processing
+
+The properties below tune Druid's native expression engine, which evaluates virtual columns, expression-based filters,
+the `expression` aggregator/post-aggregator, and any SQL functions that lower to native expressions.
+
+|Property|Description|Default|
+|--------|-----------|-------|
+|`druid.expressions.processArraysAsMultiValueStrings`|If true, all `ARRAY` typed values are converted to `STRING` by column selectors and treated as multi-value strings rather than native arrays. Provided for backwards compatibility with the behavior of Druid 24.0 and earlier, before array types were introduced.|false|
+|`druid.expressions.homogenizeNullMultiValueStringArrays`|If true, multi-value string expression input values of `null`, `[]`, and `[null]` are all coerced to `[null]`. Provided for backwards compatibility with Druid 0.22 and earlier. If false (the default), this coercion only happens when single-value expressions are implicitly mapped across multi-value rows, so the single-valued expression is evaluated with an input of `null`.|false|
+|`druid.expressions.allowVectorizeFallback`|If true, the vectorized query engine handles expressions without a native vectorized implementation using a fallback processor that invokes the scalar expression evaluator in a loop. If false, such expressions cannot be vectorized and the query falls back to the non-vectorized engine.|true|
+|`druid.expressions.useVectorApi`|If true, vectorized expression vector processors and numeric vector aggregators dispatch to SIMD specializations backed by the JDK incubator Vector API (`jdk.incubator.vector`) where available. Requires `--add-modules=jdk.incubator.vector` on the JVM command line (see [strong encapsulation](../operations/java.md#strong-encapsulation)). Off by default while the Vector API remains an incubator JDK feature.|false|
+
### Double column storage
Prior to version 0.13.0, Druid's storage layer used a 32-bit float representation to store columns created by the
@@ -748,7 +719,8 @@ These Coordinator static configurations can be defined in the `coordinator/runti
|`druid.coordinator.period`|The run period for the Coordinator. The Coordinator operates by maintaining the current state of the world in memory and periodically looking at the set of "used" segments and segments being served to make decisions about whether any changes need to be made to the data topology. This property sets the delay between each of these runs.|`PT60S`|
|`druid.coordinator.startDelay`|The operation of the Coordinator works on the assumption that it has an up-to-date view of the state of the world when it runs, the current ZooKeeper interaction code, however, is written in a way that doesn’t allow the Coordinator to know for a fact that it’s done loading the current state of the world. This delay is a hack to give it enough time to believe that it has all the data.|`PT300S`|
|`druid.coordinator.load.timeout`|The timeout duration for when the Coordinator assigns a segment to a Historical service.|`PT15M`|
-|`druid.coordinator.balancer.strategy`|The [balancing strategy](../design/coordinator.md#balancing-segments-in-a-tier) used by the Coordinator to distribute segments among the Historical servers in a tier. The `cost` strategy distributes segments by minimizing a cost function, `diskNormalized` weights these costs with the disk usage ratios of the servers and `random` distributes segments randomly.|`cost`|
+|`druid.coordinator.balancer.strategy`|The [balancing strategy](../design/coordinator.md#balancing-segments-in-a-tier) used by the Coordinator to distribute segments among the Historical servers in a tier. The `cost` strategy distributes segments by minimizing a cost function, `diskNormalized` uses normal cost within a projected disk utilization threshold and exponentially penalizes candidates outside that threshold, and `random` distributes segments randomly.|`cost`|
+|`druid.coordinator.balancer.diskNormalized.utilizationThreshold`|Only used when `druid.coordinator.balancer.strategy` is `diskNormalized`. Projected disk utilization difference that the strategy ignores before applying the exponential utilization penalty. A value of `0.05` means candidates within 5 percentage points of the least-used candidate are ordered by normal cost, while candidates outside that band are penalized exponentially by the excess utilization difference. Must be in `(0.0 [...]
|`druid.coordinator.loadqueuepeon.http.repeatDelay`|The start and repeat delay (in milliseconds) for the load queue peon, which manages the load/drop queue of segments for any server.|1 minute|
|`druid.coordinator.loadqueuepeon.http.batchSize`|Number of segment load/drop requests to batch in one HTTP request. Note that it must be smaller than or equal to the `druid.segmentCache.numLoadingThreads` config on Historical service. If this value is not configured, the coordinator uses the value of the `numLoadingThreads` for the respective server. | `druid.segmentCache.numLoadingThreads` |
|`druid.coordinator.asOverlord.enabled`|Boolean value for whether this Coordinator service should act like an Overlord as well. This configuration allows users to simplify a Druid cluster by not having to deploy any standalone Overlord services. If set to true, then Overlord console is available at `http://coordinator-host:port/console.html` and be sure to set `druid.coordinator.asOverlord.overlordService` also.|false|
@@ -795,7 +767,6 @@ These Coordinator static configurations can be defined in the `coordinator/runti
|Property|Possible values|Description|Default|
|--------|---------------|-----------|-------|
-|`druid.serverview.type`|batch or http|Segment discovery method to use. "http" enables discovering segments using HTTP instead of ZooKeeper.|http|
|`druid.coordinator.segment.awaitInitializationOnStart`|true or false|Whether the Coordinator will wait for its view of segments to fully initialize before starting up. If set to 'true', the Coordinator's HTTP server will not start up, and the Coordinator will not announce itself as available, until the server view is initialized.|true|
##### Metadata retrieval
@@ -835,6 +806,7 @@ The following table shows the dynamic configuration properties for the Coordinat
|`replicateAfterLoadTimeout`|Boolean flag for whether or not additional replication is needed for segments that have failed to load due to the expiry of `druid.coordinator.load.timeout`. If this is set to true, the Coordinator will attempt to replicate the failed segment on a different historical server. This helps improve the segment availability if there are a few slow Historicals in the cluster. However, the slow Historical may still load the segment later and the Coordinator may issu [...]
|`turboLoadingNodes`| Experimental. List of Historical servers to place in turbo loading mode. These servers use a larger thread-pool to load segments faster but at the cost of query performance. For servers specified in `turboLoadingNodes`, `druid.coordinator.loadqueuepeon.http.batchSize` is ignored and the coordinator uses the value of the respective `numLoadingThreads` instead.<br/>Please use this config with caution. All servers should eventually be removed from this list once the se [...]
|`cloneServers`| Experimental. Map from target Historical server to source Historical server which should be cloned by the target. The target Historical does not participate in regular segment assignment or balancing. Instead, the Coordinator mirrors any segment assignment made to the source Historical onto the target Historical, so that the target becomes an exact copy of the source. Segments on the target Historical do not count towards replica counts either. If the source disappears, [...]
+|`historicalTierAliases`|Map from a virtual tier name to the set of real Historical tier names it expands to. When a load/drop rule references a virtual alias tier, the Coordinator replaces it with its real tiers — each receiving the full replica count independently. The alias key itself is never loaded to directly. For example, `{"hot": ["hot_1", "hot_2"]}` causes a rule of `{"hot": 2}` to load 2 replicas on each of `hot_1` and `hot_2`; `hot` receives no direct assignment. An alias valu [...]
##### Smart segment loading
@@ -989,7 +961,7 @@ These Overlord static configurations can be defined in the `overlord/runtime.pro
|Property|Description|Default|
|--------|-----------|-------|
-|`druid.indexer.runner.type`|Indicates whether tasks should be run locally using `local` or in a distributed environment using `remote`. The recommended option is `httpRemote`, which is similar to `remote` but uses HTTP to interact with Middle Managers instead of ZooKeeper.|`httpRemote`|
+|`druid.indexer.runner.type`|Indicates whether tasks should be run locally using `local` or in a distributed environment using `httpRemote`. `httpRemote` is recommended for distributed deployments and uses HTTP to interact with Middle Managers.|`httpRemote`|
|`druid.indexer.server.maxConcurrentActions`|Maximum number of concurrent action requests (such as getting locks, creating segments, fetching segments etc) that the Overlord will process simultaneously. This prevents thread exhaustion while preserving access to health check endpoints. Set to `0` to disable quality of service filtering entirely. If not specified, defaults to `max(1, max(serverHttpNumThreads - 4, serverHttpNumThreads * 0.8))`.|`max(1, max(serverHttpNumThreads - 4, serverHt [...]
|`druid.indexer.storage.type`|Indicates whether incoming tasks should be stored locally (in heap) or in metadata storage. One of `local` or `metadata`. `local` is mainly for internal testing while `metadata` is recommended in production because storing incoming tasks in metadata storage allows for tasks to be resumed if the Overlord should fail.|`local`|
|`druid.indexer.storage.recentlyFinishedThreshold`|Duration of time to store task results. Default is 24 hours. If you have hundreds of tasks running in a day, consider increasing this threshold.|`PT24H`|
@@ -1004,17 +976,14 @@ These Overlord static configurations can be defined in the `overlord/runtime.pro
|`druid.indexer.queue.storageSyncRate`|Sync Overlord state this often with an underlying task persistence mechanism.|`PT1M`|
|`druid.indexer.queue.maxTaskPayloadSize`|Maximum allowed size in bytes of a single task payload accepted by the Overlord.|none (allow all task payload sizes)|
-The following configs only apply if the Overlord is running in remote mode. For a description of local vs. remote mode, see [Overlord service](../design/overlord.md).
+The following configs apply when the Overlord is running with the `httpRemote` runner. For a description of local vs. distributed mode, see [Overlord service](../design/overlord.md).
|Property|Description|Default|
|--------|-----------|-------|
|`druid.indexer.runner.taskAssignmentTimeout`|How long to wait after a task has been assigned to a Middle Manager before throwing an error.|`PT5M`|
|`druid.indexer.runner.minWorkerVersion`|The minimum Middle Manager version to send tasks to. The version number is a string. This affects the expected behavior during certain operations like comparison against `druid.worker.version`. Specifically, the version comparison follows dictionary order. Use ISO8601 date format for the version to accommodate date comparisons. |"0"|
|`druid.indexer.runner.parallelIndexTaskSlotRatio`| The ratio of task slots available for parallel indexing supervisor tasks per worker. The specified value must be in the range `[0, 1]`. |1|
-|`druid.indexer.runner.compressZnodes`|Indicates whether or not the Overlord should expect Middle Managers to compress Znodes.|true|
-|`druid.indexer.runner.maxZnodeBytes`|The maximum size Znode in bytes that can be created in ZooKeeper, should be in the range of `[10KiB, 2GiB)`. [Human-readable format](human-readable-byte.md) is supported.| 512 KiB |
-|`druid.indexer.runner.taskCleanupTimeout`|How long to wait before failing a task after a Middle Manager is disconnected from ZooKeeper.|`PT15M`|
-|`druid.indexer.runner.taskShutdownLinkTimeout`|How long to wait on a shutdown request to a Middle Manager before timing out|`PT1M`|
+|`druid.indexer.runner.taskCleanupTimeout`|How long to wait before failing a task after a Middle Manager is disconnected.|`PT15M`|
|`druid.indexer.runner.pendingTasksRunnerNumThreads`|Number of threads to allocate pending-tasks to workers, must be at least 1.|1|
|`druid.indexer.runner.maxRetriesBeforeBlacklist`|Number of consecutive times the Middle Manager can fail tasks, before the worker is blacklisted, must be at least 1|5|
|`druid.indexer.runner.workerBlackListBackoffTime`|How long to wait before a task is whitelisted again. This value should be greater that the value set for taskBlackListCleanupPeriod.|`PT15M`|
@@ -1345,12 +1314,10 @@ Middle Managers pass their configurations down to their child peons. The Middle
|Property|Description|Default|
|--------|-----------|-------|
|`druid.indexer.runner.allowedPrefixes`|Whitelist of prefixes for configs that can be passed down to child peons.|`com.metamx`, `druid`, `org.apache.druid`, `user.timezone`, `file.encoding`, `java.io.tmpdir`, `hadoop`|
-|`druid.indexer.runner.compressZnodes`|Indicates whether or not the Middle Managers should compress Znodes.|true|
|`druid.indexer.runner.classpath`|Java classpath for the peon.|`System.getProperty("java.class.path")`|
-|`druid.indexer.runner.javaCommand`|Command required to execute java.|java|
+|`druid.indexer.runner.javaCommand`| Command required to execute java. If not specified, Druid uses the bundled `bin/run-java` script when it is present in the working directory (it honors the `DRUID_JAVA_HOME`/`JAVA_HOME` environment variables), otherwise it falls back to `java` on the `PATH`.|`bin/run-java` if present, else `java`|
|`druid.indexer.runner.javaOpts`|_DEPRECATED_ A string of -X Java options to pass to the peon's JVM. Quotable parameters or parameters with spaces are encouraged to use javaOptsArray|`''`|
|`druid.indexer.runner.javaOptsArray`|A JSON array of strings to be passed in as options to the peon's JVM. This is additive to `druid.indexer.runner.javaOpts` and is recommended for properly handling arguments which contain quotes or spaces like `["-XX:OnOutOfMemoryError=kill -9 %p"]`|`[]`|
-|`druid.indexer.runner.maxZnodeBytes`|The maximum size Znode in bytes that can be created in ZooKeeper, should be in the range of [10KiB, 2GiB). [Human-readable format](human-readable-byte.md) is supported.|512KiB|
|`druid.indexer.runner.startPort`|Starting port used for Peon services, should be greater than 1023 and less than 65536.|8100|
|`druid.indexer.runner.endPort`|Ending port used for Peon services, should be greater than or equal to `druid.indexer.runner.startPort` and less than 65536.|65535|
|`druid.indexer.runner.ports`|A JSON array of integers to specify ports that used for Peon services. If provided and non-empty, ports for Peon services will be chosen from these ports. And `druid.indexer.runner.startPort/druid.indexer.runner.endPort` will be completely ignored.|`[]`|
@@ -1360,6 +1327,7 @@ Middle Managers pass their configurations down to their child peons. The Middle
|`druid.worker.baseTaskDirs`|List of base temporary working directories, one of which is assigned per task in a round-robin fashion. This property can be used to allow usage of multiple disks for indexing. This property is recommended in place of and takes precedence over `${druid.indexer.task.baseTaskDir}`. If this configuration is not set, `${druid.indexer.task.baseTaskDir}` is used. For example, `druid.worker.baseTaskDirs=[\"PATH1\",\"PATH2\",...]`.|null|
|`druid.worker.baseTaskDirSize`|The total amount of bytes that can be used by tasks on any single task dir. This value is treated symmetrically across all directories, that is, if this is 500 GB and there are 3 `baseTaskDirs`, then each of those task directories is assumed to allow for 500 GB to be used and a total of 1.5 TB will potentially be available across all tasks. The actual amount of memory assigned to each task is discussed in [Configuring task storage sizes](../ingestion/tasks [...]
|`druid.worker.category`|A string to name the category that the Middle Manager node belongs to.|`_default_worker_category`|
+|`druid.worker.startAlwaysEnabled`|If true, the Middle Manager always starts in the enabled state. If false, a disabled state set via the worker disable API is persisted and restored across restarts.|`false`|
|`druid.indexer.fork.property.druid.centralizedDatasourceSchema.enabled`| This config should be set when [Centralized Datasource Schema](#centralized-datasource-schema-experimental) feature is enabled. |false|
#### Peon processing
@@ -1476,6 +1444,8 @@ For most types of tasks, `SegmentWriteOutMediumFactory` can be configured per-ta
|`druid.worker.baseTaskDirSize`|The total amount of bytes that can be used by tasks on any single task dir. This value is treated symmetrically across all directories, that is, if this is 500 GB and there are 3 `baseTaskDirs`, then each of those task directories is assumed to allow for 500 GB to be used and a total of 1.5 TB will potentially be available across all tasks. The actual amount of memory assigned to each task is discussed in [Configuring task storage sizes](../ingestion/tasks [...]
|`druid.worker.globalIngestionHeapLimitBytes`|Total amount of heap available for ingestion processing. This is applied by automatically setting the `maxBytesInMemory` property on tasks.|Configured max JVM heap size / 6|
|`druid.worker.numConcurrentMerges`|Maximum number of segment persist or merge operations that can run concurrently across all tasks.|`druid.worker.capacity` / 2, rounded down|
+|`druid.worker.startAlwaysEnabled`|If true, the Indexer always starts in the enabled state. If false, a disabled state set via the worker disable API is persisted and restored across restarts.|`false`|
+|`druid.worker.useSeparateTaskLogFiles`|If true, the Indexer routes the log output of each task to a separate per-task log file via Log4j thread context. If false, task log entries are written only to the Indexer process log, and per-task log files are not produced or pushed to long-term storage. Has no effect on Middle Manager or Overlord processes.|`true`|
|`druid.indexer.task.baseDir`|Base temporary working directory.|`System.getProperty("java.io.tmpdir")`|
|`druid.indexer.task.baseTaskDir`|Base temporary working directory for tasks.|`${druid.indexer.task.baseDir}/persistent/tasks`|
|`druid.indexer.task.gracefulShutdownTimeout`|Wait this long on Indexer restart for restorable tasks to gracefully exit.|`PT5M`|
@@ -1683,7 +1653,7 @@ These Broker configurations can be defined in the `broker/runtime.properties` fi
|Property|Possible Values|Description|Default|
|--------|---------------|-----------|-------|
-|`druid.broker.balancer.type`|`random`, `connectionCount`|Determines how the broker balances connections to Historical processes. `random` choose randomly, `connectionCount` picks the process with the fewest number of active connections to|`random`|
+|`druid.broker.balancer.type`|`random`, `connectionCount`|Determines how the broker balances connections to Historical processes. `random` chooses randomly, `connectionCount` picks the process with the fewest number of active connections to it.|`random`|
|`druid.broker.select.tier`|`highestPriority`, `lowestPriority`, `custom`, `preferred`|If segments are cross-replicated across tiers in a cluster, you can tell the broker to prefer to select segments in a tier with a certain priority.|`highestPriority`|
|`druid.broker.select.tier.custom.priorities`|An array of integer priorities, such as `[-1, 0, 1, 2]`|Select servers in tiers with a custom priority list.|The config only has effect if `druid.broker.select.tier` is set to `custom`. If `druid.broker.select.tier` is set to `custom` but this config is not specified, the effect is the same as `druid.broker.select.tier` set to `highestPriority`. Any of the integers in this config can be ignored if there's no corresponding tiers with such prio [...]
|`druid.broker.select.tier.preferred.tier`| The preferred tier name. E.g., `_default_tier` | A non-empty value that specifies the preferred tier in which historical servers will be picked up for queries. If there are not enough historical servers from the preferred tier, servers from other tiers (if there are any) will be selected. This config only has effect if `druid.broker.select.tier` is set to `preferred` | null |
@@ -1770,6 +1740,42 @@ This laning strategy is best suited for cases where one or more external applica
|`druid.query.scheduler.laning.lanes.{name}`|Maximum percent or exact limit of queries that can concurrently run in the defined lanes. Any number of lanes may be defined like this. The lane names 'total' and 'default' are reserved for internal use.|No default, must define at least one lane with a limit above 0. If `druid.query.scheduler.laning.isLimitPercent` is set to `true`, values must be integers in the range of 1 to 100.|
|`druid.query.scheduler.laning.isLimitPercent`|If set to `true`, the values set for `druid.query.scheduler.laning.lanes` will be treated as a percent of the smaller number of `druid.server.http.numThreads` or `druid.query.scheduler.numThreads`. Note that in this mode, these lane values across lanes are _not_ required to add up to, and can exceed, 100%.|`false`|
+###### Weighted laning strategy
+
+This laning strategy assigns a cost to each query based on how many of a configurable set of thresholds it breaches, then routes the query to the most restrictive lane whose `minCost` the query meets. It is a more granular alternative to the 'High/Low' strategy: rather than a binary split, a query that breaches one threshold can be assigned to a different lane than one that breaches several. The thresholds are the same ones used by the [threshold prioritization strategy](#threshold-prior [...]
+
+If a lane is specified in the [query context](../querying/query-context-reference.md) `lane` parameter, this will override the computed lane.
+
+This strategy can be enabled by setting `druid.query.scheduler.laning.strategy=weighted`.
+
+|Property|Description|Default|
+|--------|-----------|-------|
+|`druid.query.scheduler.laning.periodThreshold`|ISO 8601 period. A query is charged 1 if any of its intervals starts before `now - periodThreshold` (that is, it reads data older than this).|null (not evaluated)|
+|`druid.query.scheduler.laning.durationThreshold`|ISO 8601 duration (must not contain month or year components). A query is charged 1 if its total interval duration exceeds this.|null (not evaluated)|
+|`druid.query.scheduler.laning.segmentCountThreshold`|A query is charged 1 if the number of segments it involves exceeds this. Must be greater than 0.|null (not evaluated)|
+|`druid.query.scheduler.laning.segmentRangeThreshold`|ISO 8601 duration (must not contain month or year components). A query is charged 1 if the summed time range of its distinct segments exceeds this.|null (not evaluated)|
+|`druid.query.scheduler.laning.periodWeight`|Optional weight added to a query's cost when it breaches `periodThreshold`. Must be an integer >= 1, and `periodThreshold` must be set.|1|
+|`druid.query.scheduler.laning.durationWeight`|Optional weight added to a query's cost when it breaches `durationThreshold`. Must be an integer >= 1, and `durationThreshold` must be set.|1|
+|`druid.query.scheduler.laning.segmentCountWeight`|Optional weight added to a query's cost when it breaches `segmentCountThreshold`. Must be an integer >= 1, and `segmentCountThreshold` must be set.|1|
+|`druid.query.scheduler.laning.segmentRangeWeight`|Optional weight added to a query's cost when it breaches `segmentRangeThreshold`. Must be an integer >= 1, and `segmentRangeThreshold` must be set.|1|
+|`druid.query.scheduler.laning.lanes`|A map of lane name to its configuration. At least one lane must be defined. Each lane's configuration has two fields: `minCost`, the minimum query cost required to be assigned to the lane (a query is assigned to the lane with the highest `minCost` it meets; must be greater than 0 and unique across lanes so lane selection is deterministic), and `maxPercent`, the maximum percent of the smaller number of `druid.server.http.numThreads` or `druid.query.sc [...]
+
+At least one of `periodThreshold`, `durationThreshold`, `segmentCountThreshold`, or `segmentRangeThreshold` must be set. For example, the following configuration routes queries breaching 1 or 2 thresholds to a `low` lane capped at 30% capacity, and queries breaching 3 or 4 thresholds to a `very-low` lane capped at 10%:
+
+```json
+{
+ "strategy": "weighted",
+ "periodThreshold": "P1M",
+ "durationThreshold": "P1D",
+ "segmentCountThreshold": 1000,
+ "segmentRangeThreshold": "P180D",
+ "lanes": {
+ "low": { "minCost": 1, "maxPercent": 30 },
+ "very-low": { "minCost": 3, "maxPercent": 10 }
+ }
+}
+```
+
##### Server configuration
Druid uses Jetty to serve HTTP requests. Each query being processed consumes a single thread from `druid.server.http.numThreads`, so consider defining `druid.query.scheduler.numThreads` to a lower value in order to reserve HTTP threads for responding to health checks, lookup loading, and other non-query, (in most cases) comparatively very short-lived, HTTP requests.
@@ -1927,7 +1933,6 @@ See [cache configuration](#cache-configuration) for how to configure cache setti
|Property|Possible Values|Description|Default|
|--------|---------------|-----------|-------|
-|`druid.serverview.type`|batch or http|Segment discovery method to use. "http" enables discovering segments using HTTP instead of ZooKeeper.|http|
|`druid.broker.segment.watchedTiers`|List of strings|The Broker watches segment announcements from processes that serve segments to build a cache to relate each process to the segments it serves. This configuration allows the Broker to only consider segments being served from a list of tiers. By default, Broker considers all tiers. This can be used to partition your dataSources in specific Historical tiers and configure brokers in partitions so that they are only queryable for specific d [...]
|`druid.broker.segment.ignoredTiers`|List of strings|The Broker watches segment announcements from processes that serve segments to build a cache to relate each process to the segments it serves. This configuration allows the Broker to ignore the segments being served from a list of tiers. By default, Broker considers all tiers. This config is mutually exclusive from `druid.broker.segment.watchedTiers` and at most one of these can be configured on a Broker.|none|
|`druid.broker.segment.watchedDataSources`|List of strings|Broker watches the segment announcements from processes serving segments to build cache of which process is serving which segments, this configuration allows to only consider segments being served from a whitelist of dataSources. By default, Broker would consider all datasources. This can be used to configure brokers in partitions so that they are only queryable for specific dataSources.|none|
@@ -2253,6 +2258,7 @@ Supported runtime properties:
|`druid.query.groupBy.maxMergingDictionarySize`|Maximum amount of heap space (approximately) to use for per-query string dictionaries. When the dictionary exceeds this size, a spill to disk will be triggered. See [groupBy memory tuning and resource limits](../querying/groupbyquery.md#memory-tuning-and-resource-limits) for details.|100000000|
|`druid.query.groupBy.maxOnDiskStorage`|Maximum amount of disk space to use, per-query, for spilling result sets to disk when either the merging buffer or the dictionary fills up. Queries that exceed this limit will fail. Set to zero to disable disk spilling.|0 (disabled)|
|`druid.query.groupBy.maxSpillFileCount`|Maximum number of spill files allowed per GroupBy query. Queries that exceed this limit will fail. See [groupBy memory tuning and resource limits](../querying/groupbyquery.md#memory-tuning-and-resource-limits) for details.|Integer.MAX_VALUE (unlimited)|
+|`druid.query.groupBy.minSpillFileSize`|Minimum number of bytes that must accumulate across pending in-memory spill runs before they are flushed as a single file to disk. Smaller spills are batched in heap memory to avoid creating many tiny files. Higher values reduce file count but increase heap usage.|1048576 (1 MiB)|
|`druid.query.groupBy.defaultOnDiskStorage`|Default amount of disk space to use, per-query, for spilling the result sets to disk when either the merging buffer or the dictionary fills up. Set to zero to disable disk spilling for queries which don't override `maxOnDiskStorage` in their context.|`druid.query.groupBy.maxOnDiskStorage`|
Supported query contexts:
@@ -2263,6 +2269,7 @@ Supported query contexts:
|`maxMergingDictionarySize`|Can be used to lower the value of `druid.query.groupBy.maxMergingDictionarySize` for this query.|
|`maxOnDiskStorage`|Can be used to set `maxOnDiskStorage` to a value between 0 and `druid.query.groupBy.maxOnDiskStorage` for this query. If this query context override exceeds `druid.query.groupBy.maxOnDiskStorage`, the query will use `druid.query.groupBy.maxOnDiskStorage`. Omitting this from the query context will cause the query to use `druid.query.groupBy.defaultOnDiskStorage` for `maxOnDiskStorage`|
|`maxSpillFileCount`|Can be used to override the value of `druid.query.groupBy.maxSpillFileCount` for this query.|
+|`minSpillFileSize`|Can be used to override the value of `druid.query.groupBy.minSpillFileSize` for this query.|
### Advanced configurations
diff --git a/docs/latest/configuration/logging.md b/docs/38.0.0/configuration/logging.md
similarity index 80%
copy from docs/latest/configuration/logging.md
copy to docs/38.0.0/configuration/logging.md
index dcfa9a926..76749c8f6 100644
--- a/docs/latest/configuration/logging.md
+++ b/docs/38.0.0/configuration/logging.md
@@ -133,38 +133,3 @@ Java runtime itself.
This file is not rotated, but it is generally small due to the low volume of messages.
If necessary, you can truncate it using the Linux command `truncate --size 0 log/historical.stdout.log`.
-## Set the logs to asynchronously write
-
-If your logs are really chatty, you can set them to write asynchronously.
-The following example shows a `log4j2.xml` that configures some of the more chatty classes to write asynchronously:
-
-```
-<?xml version="1.0" encoding="UTF-8" ?>
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT">
- <PatternLayout pattern="%d{ISO8601} %p [%t] %c -%notEmpty{ [%markerSimpleName]} %m%n"/>
- </Console>
- </Appenders>
-
-<Loggers>
- <!-- AsyncLogger instead of Logger -->
- <AsyncLogger name="org.apache.druid.curator.inventory.CuratorInventoryManager" level="debug" additivity="false">
- <AppenderRef ref="Console"/>
- </AsyncLogger>
- <AsyncLogger name="org.apache.druid.client.BatchServerInventoryView" level="debug" additivity="false">
- <AppenderRef ref="Console"/>
- </AsyncLogger>
- <!-- Make extra sure nobody adds logs in a bad way that can hurt performance -->
- <AsyncLogger name="org.apache.druid.client.ServerInventoryView" level="debug" additivity="false">
- <AppenderRef ref="Console"/>
- </AsyncLogger>
- <AsyncLogger name ="org.apache.druid.java.util.http.client.pool.ChannelResourceFactory" level="info" additivity="false">
- <AppenderRef ref="Console"/>
- </AsyncLogger>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
-```
diff --git a/docs/latest/data-management/automatic-compaction.md b/docs/38.0.0/data-management/automatic-compaction.md
similarity index 97%
copy from docs/latest/data-management/automatic-compaction.md
copy to docs/38.0.0/data-management/automatic-compaction.md
index e455319d9..221888e3b 100644
--- a/docs/latest/data-management/automatic-compaction.md
+++ b/docs/38.0.0/data-management/automatic-compaction.md
@@ -22,7 +22,7 @@ title: "Automatic compaction"
~ under the License.
-->
-In Apache Druid, compaction is a special type of ingestion task that reads data from a Druid datasource and writes it back into the same datasource. A common use case for this is to [optimally size segments](../operations/segment-optimization.md) after ingestion to improve query performance. Automatic compaction, or auto-compaction, refers to the system for automatic execution of compaction tasks issued by Druid itself. In addition to auto-compaction, you can perform [manual compaction]( [...]
+In Apache® Druid, compaction is a special type of ingestion task that reads data from a Druid datasource and writes it back into the same datasource. A common use case for this is to [optimally size segments](../operations/segment-optimization.md) after ingestion to improve query performance. Automatic compaction, or auto-compaction, refers to the system for automatic execution of compaction tasks issued by Druid itself. In addition to auto-compaction, you can perform [manual co [...]
:::info
Auto-compaction skips datasources that have a segment granularity of `ALL`.
diff --git a/docs/38.0.0/data-management/cascading-reindexing.md b/docs/38.0.0/data-management/cascading-reindexing.md
new file mode 100644
index 000000000..1cc11764a
--- /dev/null
+++ b/docs/38.0.0/data-management/cascading-reindexing.md
@@ -0,0 +1,414 @@
+---
+id: cascading-reindexing
+title: "Cascading reindexing"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+:::info
+Cascading reindexing is an experimental feature introduced in Druid 37. Its API may change in future releases. This feature is only for automatic compaction using [compaction supervisors](automatic-compaction.md#auto-compaction-using-compaction-supervisors) with the [MSQ task engine](automatic-compaction.md#use-msq-for-auto-compaction).
+:::
+
+Cascading reindexing is a compaction supervisor template that lets you define age-based rules to automatically apply different compaction configurations as data ages. Instead of a single flat compaction configuration for an entire datasource, you define rules that say "for data older than X, apply configuration Y." Reindexing is a more general term than compaction. Reindexing not only can merge segments with the same schema and partitioning, but also can change the segment schema, partit [...]
+
+For example, you might want to:
+- Keep recent data in hourly segments, but coarsen to daily segments after 90 days to help reduce segment count and storage footprint.
+- Delete some unwanted rows from data older than 30 days.
+- Change compression settings for older data.
+- Roll up older data to a coarser query granularity
+
+Cascading reindexing handles all of this automatically by generating a timeline of compaction intervals and applying the appropriate rules to each interval.
+
+## Prerequisites
+
+Before using cascading reindexing, ensure your cluster meets the following requirements:
+
+- **MSQ compaction engine**: Set `engine` to `msq` in the compaction dynamic config or in the supervisor spec.
+- **At least two compaction task slots**: The MSQ task engine requires at least two tasks (one controller, one worker).
+
+## How cascading reindexing works
+
+### Rule-based configuration
+
+Cascading reindexing uses a rule-based system where each rule controls a specific aspect of compaction and specifies an age threshold for when it applies. There are four rule types, each controlling an orthogonal aspect of the compaction config output for an interval:
+
+| Rule type | What it controls | Additive? |
+|---|---|---|
+| [Partitioning](#partitioning-rules) | Segment granularity, partitions spec, optional virtual columns for range partitioning | No |
+| [Deletion](#deletion-rules) | Rows to remove from segments | Yes |
+| [Index spec](#index-spec-rules) | Compression and encoding settings | No |
+| [Data schema](#data-schema-rules) | Dimensions, metrics, query granularity, rollup, projections | No |
+
+Every rule has an `olderThan` field — an [ISO 8601 period](https://en.wikipedia.org/wiki/ISO_8601#Durations) that defines the age threshold. A rule with `"olderThan": "P30D"` applies to data whose interval ends before the current time minus 30 days.
+
+### Additive vs non-additive rules
+
+**Non-additive rules** (partitioning, index spec, data schema): Only one rule of each type can apply per interval. When multiple rules of the same type match, the rule with the oldest threshold (largest period) takes precedence.
+
+**Additive rules** (deletion): Multiple deletion rules can apply to the same interval. When they do, they combine as `NOT(A OR B OR C)`, where A, B, and C are the `deleteWhere` filters from each rule. In other words, the compacted data retains only the rows that don't match any of the deletion filters.
+
+### Timeline generation
+
+The cascading reindexing template generates a timeline of non-overlapping search intervals, each with its own set of applicable rules. Here is how the timeline is constructed:
+
+1. **Build a base timeline from partitioning rules.** Each partitioning rule defines a segment granularity and an age threshold. The template sorts rules by threshold (oldest first) and creates intervals with boundaries aligned to each rule's segment granularity.
+
+2. **Split at non-partitioning rule thresholds.** If deletion, index spec, or data schema rules have thresholds that fall inside a base interval, the template splits that interval at the threshold (aligned to the interval's segment granularity). This ensures rules are applied as precisely as possible.
+
+3. **Validate granularity ordering.** The template validates that segment granularity stays the same or becomes finer as you move from past to present. For example, DAY for old data and HOUR for recent data is valid, but HOUR for old data and DAY for recent data is not.
+
+#### Timeline generation example
+
+Suppose the current time is `2026-03-26T00:00:00Z` and you configure the following rules:
+
+- **Partitioning rule A**: `olderThan: P7D`, `segmentGranularity: HOUR`
+- **Partitioning rule B**: `olderThan: P90D`, `segmentGranularity: DAY`
+- **Deletion rule C**: `olderThan: P30D`, `deleteWhere: isRobot = true`
+
+The template generates these search intervals:
+
+| Search interval | Segment granularity | Source | Active rules |
+|---|---|---|---|
+| `[-inf, 2025-12-26)` | DAY | Partitioning rule B | B, C |
+| `[2025-12-26, 2026-02-24)` | DAY | Default (from template) | C |
+| `[2026-02-24, 2026-03-19)` | HOUR | Partitioning rule A | A |
+
+How this works step by step:
+
+1. Partitioning rule B (`olderThan: P90D`) creates the interval `[-inf, 2025-12-26)` with DAY granularity. Partitioning rule A (`olderThan: P7D`) creates `[2025-12-26, 2026-03-19)` with HOUR granularity.
+2. Deletion rule C (`olderThan: P30D`) has a threshold of `2026-02-24`. This falls inside rule A's interval, so that interval is split at `2026-02-24` (which is already DAY-aligned). The older sub-interval `[2025-12-26, 2026-02-24)` picks up deletion rule C; the newer sub-interval `[2026-02-24, 2026-03-19)` does not.
+3. Granularity validation passes because DAY (older) to HOUR (newer) is valid — granularity becomes finer toward the present.
+
+### How defaults work
+
+The template requires `defaultSegmentGranularity` and `defaultPartitionsSpec`. These are used for any interval where no partitioning rule matches. This happens in two scenarios:
+
+1. **No partitioning rules defined at all.** If you only define deletion, index spec, or data schema rules, all intervals use the default granularity and partitions spec.
+2. **Non-partitioning rules have a more recent threshold than the newest partitioning rule.** For example, if your only partitioning rule is `olderThan: P90D` but you have a deletion rule with `olderThan: P30D`, intervals between 30 and 90 days old will use the defaults.
+
+## Supervisor spec reference
+
+To submit a cascading reindexing supervisor, wrap the template spec inside a compaction supervisor spec:
+
+```json
+{
+ "type": "autocompact",
+ "spec": {
+ "type": "reindexCascade",
+ "dataSource": "wikipedia",
+ "ruleProvider": { ... },
+ "defaultSegmentGranularity": "DAY",
+ "defaultPartitionsSpec": {
+ "type": "dynamic",
+ "maxRowsPerSegment": 5000000
+ }
+ }
+}
+```
+
+### Template properties
+
+The following table describes the properties of the `reindexCascade` template:
+
+| Field | Description | Required | Default |
+|---|---|---|---|
+| `type` | Must be `reindexCascade`. | Yes | |
+| `dataSource` | The datasource to compact. | Yes | |
+| `ruleProvider` | [Rule provider](#rule-provider-types) configuration that supplies reindexing rules. | Yes | |
+| `defaultSegmentGranularity` | Segment granularity used for intervals where no partitioning rule matches. Supported values: `MINUTE`, `FIFTEEN_MINUTE`, `HOUR`, `DAY`, `MONTH`, `QUARTER`, `YEAR`. | Yes | |
+| `defaultPartitionsSpec` | Partitions spec used for intervals where no partitioning rule matches. See [MSQ task engine limitations](automatic-compaction.md#msq-task-engine-limitations) for supported partitioning types. | Yes | |
+| `defaultPartitioningVirtualColumns` | Optional virtual columns used if your `defaultPartitionsSpec` range partitioning definition references virtual columns | No | |
+| `taskPriority` | Priority of compaction tasks. | No | 25 |
+| `inputSegmentSizeBytes` | Maximum total input segment size in bytes per compaction task. | No | 100000000000000 |
+| `taskContext` | Context map passed to compaction tasks. Use this to set [MSQ context parameters](../multi-stage-query/reference.md#context-parameters) such as `maxNumTasks`. | No | |
+| `skipOffsetFromLatest` | ISO 8601 period. Skips data newer than this offset from the end of the latest segment. Mutually exclusive with `skipOffsetFromNow`. | No | |
+| `skipOffsetFromNow` | ISO 8601 period. Skips data newer than this offset from the current time. Mutually exclusive with `skipOffsetFromLatest`. | No | |
+| `tuningConfig` | [Tuning config](../ingestion/native-batch.md#tuningconfig) for compaction tasks. You cannot set `partitionsSpec` inside `tuningConfig` — partitioning is controlled by rules and supervisor default. | No | |
+
+### Rule provider types
+
+A rule provider supplies the reindexing rules to the template. Druid supports two provider types.
+
+#### Inline provider
+
+The inline provider (`type: inline`) defines rules directly in the supervisor spec. This is currently the only concrete implementation.
+
+```json
+{
+ "type": "inline",
+ "partitioningRules": [ ... ],
+ "deletionRules": [ ... ],
+ "indexSpecRules": [ ... ],
+ "dataSchemaRules": [ ... ]
+}
+```
+
+| Field | Description | Required | Default |
+|---|---|---|---|
+| `type` | Must be `inline`. | Yes | |
+| `partitioningRules` | List of [partitioning rules](#partitioning-rules). | No | `[]` |
+| `deletionRules` | List of [deletion rules](#deletion-rules). | No | `[]` |
+| `indexSpecRules` | List of [index spec rules](#index-spec-rules). | No | `[]` |
+| `dataSchemaRules` | List of [data schema rules](#data-schema-rules). | No | `[]` |
+
+At least one rule must be defined across all rule lists.
+
+#### Composing provider
+
+The composing provider (`type: composing`) chains multiple rule providers together with first-wins semantics. For each rule type, Druid uses the rules from the first provider that has non-empty rules of that type.
+
+This rule provider exists in anticipation of future community contributed providers, such as a provider that sources rules from the Druid Catalog.
+
+```json
+{
+ "type": "composing",
+ "providers": [
+ { "type": "inline", "partitioningRules": [ ... ] },
+ ...
+ ]
+}
+```
+
+| Field | Description | Required | Default |
+|---|---|---|---|
+| `type` | Must be `composing`. | Yes | |
+| `providers` | Ordered list of [rule providers](#rule-provider-types). Provider order determines precedence. | Yes | |
+
+The composing provider is ready only when all child providers are ready.
+
+### Reindexing rule types
+
+All rule types share the following common fields:
+
+| Field | Description | Required |
+|---|---|---|
+| `id` | Unique identifier for the rule. | Yes |
+| `description` | Human-readable description. | No |
+| `olderThan` | ISO 8601 period defining the age threshold. The rule applies to data older than the current time minus this period. Must be non-negative. | Yes |
+
+#### Partitioning rules
+
+Partitioning rules control how data is physically laid out into segments. This includes the time bucketing (segment granularity) and how data within a time bucket is split (partitions spec).
+
+This is a non-additive rule — only one partitioning rule applies per interval.
+
+| Field | Description | Required |
+|---|---|---|
+| `id` | Rule identifier. | Yes |
+| `description` | Human-readable description. | No |
+| `olderThan` | ISO 8601 period. | Yes |
+| `segmentGranularity` | Time granularity for segment buckets. Supported values: `MINUTE`, `FIFTEEN_MINUTE`, `HOUR`, `DAY`, `MONTH`, `QUARTER`, `YEAR`. | Yes |
+| `partitionsSpec` | Defines how data within each time bucket is split into segments. Supports `dynamic` and `range` types. | Yes |
+| `virtualColumns` | Virtual columns for partitioning by nested or derived fields. | No |
+
+Example:
+
+```json
+{
+ "id": "daily-range-30d",
+ "olderThan": "P30D",
+ "segmentGranularity": "DAY",
+ "partitionsSpec": {
+ "type": "range",
+ "targetRowsPerSegment": 5000000,
+ "partitionDimensions": ["channel", "countryName"]
+ },
+ "description": "Compact to daily segments with range partitioning for data older than 30 days"
+}
+```
+
+#### Deletion rules
+
+Deletion rules specify rows to remove during compaction. The `deleteWhere` field defines a [Druid filter](../querying/filters.md) that matches rows to **delete**. During processing, Druid wraps these filters in NOT logic — the compacted data retains rows that do **not** match the filter.
+
+This is an additive rule — multiple deletion rules can apply to the same interval.
+
+| Field | Description | Required |
+|---|---|---|
+| `id` | Rule identifier. | Yes |
+| `description` | Human-readable description. | No |
+| `olderThan` | ISO 8601 period. | Yes |
+| `deleteWhere` | A [Druid filter](../querying/filters.md) matching rows to remove. | Yes |
+| `virtualColumns` | Virtual columns for filtering on nested or derived fields. Virtual column names must be unique and consistent across rule evaluations. | No |
+
+**What you write vs what happens:**
+
+If you define two deletion rules:
+- Rule 1: `deleteWhere: isRobot = true`
+- Rule 2: `deleteWhere: countryName = null`
+
+Druid applies them as: `NOT(isRobot = true OR countryName = null)`. The compacted segments retain only rows where `isRobot` is not true **and** `countryName` is not null.
+
+Example:
+
+```json
+{
+ "id": "remove-robots-90d",
+ "olderThan": "P90D",
+ "deleteWhere": {
+ "type": "equals",
+ "column": "isRobot",
+ "matchValueType": "STRING",
+ "matchValue": "true"
+ },
+ "description": "Remove robot traffic from data older than 90 days"
+}
+```
+
+#### Index spec rules
+
+Index spec rules control compression and encoding settings for compacted segments, independently of partitioning.
+
+This is a non-additive rule — only one index spec rule applies per interval.
+
+| Field | Description | Required |
+|---|---|---|
+| `id` | Rule identifier. | Yes |
+| `description` | Human-readable description. | No |
+| `olderThan` | ISO 8601 period. | Yes |
+| `indexSpec` | An [IndexSpec](../ingestion/ingestion-spec.md#indexspec) object defining bitmap type, metric compression, and other encoding settings. | Yes |
+
+Example:
+
+```json
+{
+ "id": "compressed-90d",
+ "olderThan": "P90D",
+ "indexSpec": {
+ "bitmap": { "type": "roaring" },
+ "metricCompression": "lz4"
+ },
+ "description": "Use roaring bitmaps and lz4 compression for data older than 90 days"
+}
+```
+
+#### Data schema rules
+
+Data schema rules control the schema of compacted segments, including dimensions, metrics, query granularity, rollup, and projections.
+
+This is a non-additive rule — only one data schema rule applies per interval. At least one of the optional fields must be non-null.
+
+| Field | Description | Required |
+|---|---|---|
+| `id` | Rule identifier. | Yes |
+| `description` | Human-readable description. | No |
+| `olderThan` | ISO 8601 period. | Yes |
+| `dimensionsSpec` | [Dimensions config](../ingestion/ingestion-spec.md#dimensionsspec) for the compacted segments. | No |
+| `metricsSpec` | Array of [aggregator factories](../querying/aggregations.md) for rollup metrics. | No |
+| `queryGranularity` | [Query granularity](../querying/granularities.md) for the compacted segments. | No |
+| `rollup` | Whether to enable rollup. Set to `true` only when `metricsSpec` is defined. | No |
+| `projections` | List of [aggregate projections](../querying/projections.md). | No |
+
+Example:
+
+```json
+{
+ "id": "rollup-30d",
+ "olderThan": "P30D",
+ "queryGranularity": "HOUR",
+ "rollup": true,
+ "metricsSpec": [
+ { "type": "longSum", "name": "added", "fieldName": "added" },
+ { "type": "longSum", "name": "deleted", "fieldName": "deleted" }
+ ],
+ "description": "Roll up to hourly query granularity for data older than 30 days"
+}
+```
+
+## Example
+
+The following example uses the `wikipedia` datasource and demonstrates a cascading reindexing supervisor with a partitioning rule and a deletion rule that does the following:
+
+- Data older than 30 days is compacted into daily range-partitioned segments.
+- Rows that have a `isRobot` column with a `true` value are deleted from data older than 90 days.
+- The `skipOffsetFromLatest` setting skips the most recent day of data.
+
+```bash
+curl --location --request POST 'http://localhost:8081/druid/indexer/v1/supervisor' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "type": "autocompact",
+ "spec": {
+ "type": "reindexCascade",
+ "dataSource": "wikipedia",
+ "defaultSegmentGranularity": "HOUR",
+ "defaultPartitionsSpec": {
+ "type": "dynamic",
+ "maxRowsPerSegment": 5000000
+ },
+ "skipOffsetFromLatest": "P1D",
+ "ruleProvider": {
+ "type": "inline",
+ "partitioningRules": [
+ {
+ "id": "daily-30d",
+ "olderThan": "P30D",
+ "segmentGranularity": "DAY",
+ "partitionsSpec": {
+ "type": "range",
+ "targetRowsPerSegment": 5000000,
+ "partitionDimensions": ["channel", "countryName"]
+ },
+ "description": "Compact to daily range-partitioned segments after 30 days"
+ }
+ ],
+ "deletionRules": [
+ {
+ "id": "remove-bots-90d",
+ "olderThan": "P90D",
+ "deleteWhere": {
+ "type": "equals",
+ "column": "isRobot",
+ "matchValueType": "STRING",
+ "matchValue": "true"
+ },
+ "description": "Remove robot edits from data older than 90 days"
+ }
+ ]
+ },
+ "taskContext": {
+ "maxNumTasks": 3
+ }
+ }
+}'
+```
+
+This creates three timeline intervals:
+- `[-inf, now - 90D)`: DAY granularity, bot edits deleted.
+- `[now - 90D, now - 30D)`: DAY granularity, no deletions.
+- `[now - 30D, now - 1D)`: HOUR granularity (defaults), no deletions. Data within the last day is skipped.
+
+## Limitations
+
+- **MSQ task engine only.** Cascading reindexing requires the MSQ task engine. The native engine is not supported.
+- **Compaction supervisors only.** This feature is not available for auto-compaction using Coordinator duties.
+- **No `partitionsSpec` in `tuningConfig`.** Partitioning is controlled exclusively by rules and defaults. Setting `partitionsSpec` inside `tuningConfig` causes a validation error.
+- **Granularity must not coarsen toward the present.** Segment granularity must stay the same or become finer as you move from older to newer data. For example, DAY to HOUR is valid; HOUR to DAY is not.
+- **`skipOffsetFromLatest` and `skipOffsetFromNow` are mutually exclusive.** You can set one or the other, not both.
+- **`ALL` segment granularity is not supported.** This is the same limitation as standard auto-compaction.
+
+## Learn more
+
+See the following topics for more information:
+
+* [Automatic compaction](automatic-compaction.md) for general auto-compaction configuration.
+* [Auto-compaction using compaction supervisors](automatic-compaction.md#auto-compaction-using-compaction-supervisors) for supervisor setup and management.
+* [MSQ task engine for auto-compaction](automatic-compaction.md#use-msq-for-auto-compaction) for MSQ engine requirements and limitations.
+* [Compaction](compaction.md) for an overview of compaction in Druid.
diff --git a/docs/latest/data-management/compaction.md b/docs/38.0.0/data-management/compaction.md
similarity index 94%
copy from docs/latest/data-management/compaction.md
copy to docs/38.0.0/data-management/compaction.md
index 3c31c7ef5..487958d86 100644
--- a/docs/latest/data-management/compaction.md
+++ b/docs/38.0.0/data-management/compaction.md
@@ -23,7 +23,7 @@ description: "Defines compaction and automatic compaction (auto-compaction or au
~ under the License.
-->
-Query performance in Apache Druid depends on optimally sized segments. Compaction is one strategy you can use to optimize segment size for your Druid database. Compaction tasks read an existing set of segments for a given time interval and combine the data into a new "compacted" set of segments. In some cases the compacted segments are larger, but there are fewer of them. In other cases the compacted segments may be smaller. Compaction tends to increase performance because optimized segm [...]
+Query performance in Apache® Druid depends on optimally sized segments. Compaction is one strategy you can use to optimize segment size for your Druid database. Compaction tasks read an existing set of segments for a given time interval and combine the data into a new "compacted" set of segments. In some cases the compacted segments are larger, but there are fewer of them. In other cases the compacted segments may be smaller. Compaction tends to increase performance because opti [...]
## Compaction guidelines
diff --git a/docs/latest/data-management/delete.md b/docs/38.0.0/data-management/delete.md
similarity index 94%
copy from docs/latest/data-management/delete.md
copy to docs/38.0.0/data-management/delete.md
index db87e3768..799e8b4b8 100644
--- a/docs/latest/data-management/delete.md
+++ b/docs/38.0.0/data-management/delete.md
@@ -24,7 +24,7 @@ title: "Data deletion"
## Delete data for a time range manually
-Apache Druid stores data [partitioned by time chunk](../design/storage.md) and supports
+Apache® Druid stores data [partitioned by time chunk](../design/storage.md) and supports
deleting data for time chunks by dropping segments. This is a fast, metadata-only operation.
Deletion by time range happens in two steps:
@@ -112,9 +112,13 @@ Some of the parameters used in the task payload are further explained below:
| `limit` | null (no limit) | Maximum number of segments for the kill task to delete.|
| `maxUsedStatusLastUpdatedTime` | null (no cutoff) | Maximum timestamp used as a cutoff to include unused segments. The kill task only considers segments which lie in the specified `interval` and were marked as unused no later than this time. The default behavior is to kill all unused segments in the `interval` regardless of when they where marked as unused.|
-
-**WARNING:** The `kill` task permanently removes all information about the affected segments from the metadata store and
+:::warning
+- The `kill` task permanently removes all information about the affected segments from the metadata store and
deep storage. This operation cannot be undone.
+- When using [concurrent locks](../ingestion/concurrent-append-replace.md) to run a `kill` task, ensure to keep a large
+enough buffer period before killing segments after they have been marked as unused. Otherwise, there may be a potential
+data loss if a concurrent append job upgrades one of the segments that are being killed.
+:::
### Auto-kill data using Coordinator duties
diff --git a/docs/latest/data-management/index.md b/docs/38.0.0/data-management/index.md
similarity index 93%
copy from docs/latest/data-management/index.md
copy to docs/38.0.0/data-management/index.md
index 0e0e09ac8..4b6e5de6e 100644
--- a/docs/latest/data-management/index.md
+++ b/docs/38.0.0/data-management/index.md
@@ -23,7 +23,7 @@ sidebar_label: "Overview"
~ under the License.
-->
-Apache Druid stores data [partitioned by time chunk](../design/storage.md) in immutable
+Apache® Druid stores data [partitioned by time chunk](../design/storage.md) in immutable
files called [segments](../design/segments.md). Data management operations involving replacing, or deleting,
these segments include:
diff --git a/docs/latest/data-management/manual-compaction.md b/docs/38.0.0/data-management/manual-compaction.md
similarity index 97%
copy from docs/latest/data-management/manual-compaction.md
copy to docs/38.0.0/data-management/manual-compaction.md
index 4c13d4b40..15b6f5da2 100644
--- a/docs/latest/data-management/manual-compaction.md
+++ b/docs/38.0.0/data-management/manual-compaction.md
@@ -22,7 +22,7 @@ title: "Manual compaction"
~ under the License.
-->
-In Apache Druid, compaction is a special type of ingestion task that reads data from a Druid datasource and writes it back into the same datasource. A common use case for this is to [optimally size segments](../operations/segment-optimization.md) after ingestion to improve query performance.
+In Apache® Druid, compaction is a special type of ingestion task that reads data from a Druid datasource and writes it back into the same datasource. A common use case for this is to [optimally size segments](../operations/segment-optimization.md) after ingestion to improve query performance.
You can perform manual compaction where you submit a one-time compaction task for a specific interval. Generally, you don't need to do this if you use [automatic compaction](./automatic-compaction.md), which is recommended for most workloads.
diff --git a/docs/latest/data-management/schema-changes.md b/docs/38.0.0/data-management/schema-changes.md
similarity index 92%
copy from docs/latest/data-management/schema-changes.md
copy to docs/38.0.0/data-management/schema-changes.md
index 0771da3ce..f8e175c2d 100644
--- a/docs/latest/data-management/schema-changes.md
+++ b/docs/38.0.0/data-management/schema-changes.md
@@ -25,7 +25,7 @@ title: "Schema changes"
## For new data
-Apache Druid allows you to provide a new schema for new data without the need to update the schema of any existing data.
+Apache® Druid allows you to provide a new schema for new data without the need to update the schema of any existing data.
It is sufficient to update your supervisor spec, if using [streaming ingestion](../ingestion/index.md#streaming), or to
provide the new schema the next time you do a [batch ingestion](../ingestion/index.md#batch). This is made possible by
the fact that each [segment](../design/segments.md), at the time it is created, stores a
diff --git a/docs/latest/data-management/update.md b/docs/38.0.0/data-management/update.md
similarity index 97%
copy from docs/latest/data-management/update.md
copy to docs/38.0.0/data-management/update.md
index a8c75a5d3..85423046a 100644
--- a/docs/latest/data-management/update.md
+++ b/docs/38.0.0/data-management/update.md
@@ -24,7 +24,7 @@ title: "Data updates"
## Overwrite
-Apache Druid stores data [partitioned by time chunk](../design/storage.md) and supports
+Apache® Druid stores data [partitioned by time chunk](../design/storage.md) and supports
overwriting existing data using time ranges. Data outside the replacement time range is not touched. Overwriting of
existing data is done using the same mechanisms as [batch ingestion](../ingestion/index.md#batch).
diff --git a/docs/latest/design/architecture.md b/docs/38.0.0/design/architecture.md
similarity index 97%
copy from docs/latest/design/architecture.md
copy to docs/38.0.0/design/architecture.md
index 04498defb..c99f3d1a2 100644
--- a/docs/latest/design/architecture.md
+++ b/docs/38.0.0/design/architecture.md
@@ -107,7 +107,7 @@ forking separate JVM processes per-task, the Indexer runs tasks as individual th
The Indexer is designed to be easier to configure and deploy compared to the MiddleManager + Peon system and to better enable resource sharing across tasks, which can help streaming ingestion. The Indexer is currently designated [experimental](../development/experimental.md).
-Typically, you would deploy one of the following: MiddleManagers, [MiddleManager-less ingestion using Kubernetes](../development/extensions-core/k8s-jobs.md), or Indexers. You wouldn't deploy more than one of these options.
+Typically, you would deploy one of the following: MiddleManagers, [MiddleManager-less ingestion using Kubernetes®](../development/extensions-core/k8s-jobs.md), or Indexers. You wouldn't deploy more than one of these options.
## Colocation of services
diff --git a/docs/latest/design/broker.md b/docs/38.0.0/design/broker.md
similarity index 74%
copy from docs/latest/design/broker.md
copy to docs/38.0.0/design/broker.md
index bbd6b94f2..ffd8b9801 100644
--- a/docs/latest/design/broker.md
+++ b/docs/38.0.0/design/broker.md
@@ -24,11 +24,11 @@ sidebar_label: "Broker"
-->
-The Broker service routes queries in a distributed cluster setup. It interprets the metadata published to ZooKeeper about segment distribution across services and routes queries accordingly. Additionally, the Broker service consolidates result sets from individual services.
+The Broker service routes queries in a distributed cluster setup. It discovers data-serving services via ZooKeeper, polls each one over HTTP for the segments it is serving, and routes queries accordingly. Additionally, the Broker service consolidates result sets from individual services.
## Configuration
-For Apache Druid Broker service configuration, see [Broker Configuration](../configuration/index.md#broker).
+For Apache® Druid Broker service configuration, see [Broker Configuration](../configuration/index.md#broker).
For basic tuning guidance for the Broker service, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#broker).
@@ -46,7 +46,7 @@ org.apache.druid.cli.Main server broker
Most Druid queries contain an interval object that indicates a span of time for which data is requested. Similarly, Druid partitions [segments](../design/segments.md) to contain data for some interval of time and distributes the segments across a cluster. Consider a simple datasource with seven segments where each segment contains data for a given day of the week. Any query issued to the datasource for more than one day of data will hit more than one segment. These segments will likely b [...]
-To determine which services to forward queries to, the Broker service first builds a view of the world from information in ZooKeeper. ZooKeeper maintains information about [Historical](../design/historical.md) and streaming ingestion [Peon](../design/peons.md) services and the segments they are serving. For every datasource in ZooKeeper, the Broker service builds a timeline of segments and the services that serve them. When queries are received for a specific datasource and interval, the [...]
+To determine which services to forward queries to, the Broker service first builds a view of the world from the cluster. It uses ZooKeeper to discover [Historical](../design/historical.md) and streaming ingestion [Peon](../design/peons.md) services, then polls each one over HTTP to learn the segments it is serving. For every datasource, the Broker service builds a timeline of segments and the services that serve them. When queries are received for a specific datasource and interval, the [...]
## Caching
diff --git a/docs/latest/design/coordinator.md b/docs/38.0.0/design/coordinator.md
similarity index 88%
copy from docs/latest/design/coordinator.md
copy to docs/38.0.0/design/coordinator.md
index bc4c5ebc1..80e5b0bd3 100644
--- a/docs/latest/design/coordinator.md
+++ b/docs/38.0.0/design/coordinator.md
@@ -30,20 +30,20 @@ Coordinator service communicates to Historical services to load or drop segments
The Coordinator runs its duties periodically and the time between each run is a configurable parameter. On each
run, the Coordinator assesses the current state of the cluster before deciding on the appropriate actions to take.
-Similar to the Broker and Historical services, the Coordinator maintains a connection to a ZooKeeper cluster for
-current cluster information. The Coordinator also maintains a connection to a database containing information about
-"used" segments (that is, the segments that *should* be loaded in the cluster) and the loading rules.
+The Coordinator uses ZooKeeper for leader election and to discover other Druid services, and polls each Historical
+service over HTTP for the current set of segments it is serving. The Coordinator also maintains a connection to a
+database containing information about "used" segments (that is, the segments that *should* be loaded in the cluster)
+and the loading rules.
Before any unassigned segments are serviced by Historical services, the Historical services for each tier are first
sorted in terms of capacity, with least capacity servers having the highest priority. Unassigned segments are always
-assigned to the services with least capacity to maintain a level of balance between services. The Coordinator does not
-directly communicate with a Historical service when assigning it a new segment; instead the Coordinator creates some
-temporary information about the new segment under load queue path of the Historical service. Once this request is seen,
-the Historical service loads the segment and begins servicing it.
+assigned to the services with least capacity to maintain a level of balance between services. The Coordinator sends
+segment load and drop requests to each Historical service over HTTP. Once this request is received, the Historical
+service loads the segment and begins servicing it.
## Configuration
-For Apache Druid Coordinator service configuration, see [Coordinator configuration](../configuration/index.md#coordinator).
+For Apache® Druid Coordinator service configuration, see [Coordinator configuration](../configuration/index.md#coordinator).
For basic tuning guidance for the Coordinator service, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#coordinator).
@@ -88,7 +88,7 @@ But in a tier with several Historicals (or a low replication factor), segment re
Thus, the Coordinator constantly monitors the set of segments present on each Historical in a tier and employs one of the following strategies to identify segments that may be moved from one Historical to another to retain balance.
- `cost` (default): For a given segment in a tier, this strategy picks the server with the minimum "cost" of placing that segment. The cost is a function of the data interval of the segment and the data intervals of all the segments already present on the candidate server. In essence, this strategy tries to avoid placing segments with adjacent or overlapping data intervals on the same server. This is based on the premise that adjacent-interval segments are more likely to be used together [...]
-- `diskNormalized`: A derivative of the `cost` strategy that weights the cost of placing a segment on a server with the disk usage ratio of the server. There are known issues with this strategy and is not recommended for a production cluster.
+- `diskNormalized`: A derivative of the `cost` strategy that applies normal cost when candidates are within a configured projected disk utilization threshold, and exponentially penalizes candidates outside that threshold. The projected usage ratio is `(diskUsed + segmentSizeIfNotAlreadyProjected) / maxSize`. A candidate whose projected usage ratio is within `druid.coordinator.balancer.diskNormalized.utilizationThreshold` (default `0.05`, i.e. 5 percentage points) of the least-used candid [...]
- `random`: Distributes segments randomly across servers. This is an experimental strategy and is not recommended for a production cluster.
All of the above strategies prioritize moving segments from the Historical with the least available disk space.
diff --git a/docs/latest/design/deep-storage.md b/docs/38.0.0/design/deep-storage.md
similarity index 89%
copy from docs/latest/design/deep-storage.md
copy to docs/38.0.0/design/deep-storage.md
index 0674f3242..b5c7412b7 100644
--- a/docs/latest/design/deep-storage.md
+++ b/docs/38.0.0/design/deep-storage.md
@@ -23,7 +23,7 @@ title: "Deep storage"
-->
-Deep storage is where segments are stored. It is a storage mechanism that Apache Druid does not provide. This deep storage infrastructure defines the level of durability of your data. As long as Druid processes can see this storage infrastructure and get at the segments stored on it, you will not lose data no matter how many Druid nodes you lose. If segments disappear from this storage layer, then you will lose whatever data those segments represented.
+Deep storage is where segments are stored. It is a storage mechanism that Apache® Druid does not provide. This deep storage infrastructure defines the level of durability of your data. As long as Druid processes can see this storage infrastructure and get at the segments stored on it, you will not lose data no matter how many Druid nodes you lose. If segments disappear from this storage layer, then you will lose whatever data those segments represented.
In addition to being the backing store for segments, you can use [query from deep storage](#querying-from-deep-storage) and run queries against segments stored primarily in deep storage. The [load rules](../operations/rule-configuration.md#load-rules) you configure determine whether segments exist primarily in deep storage or in a combination of deep storage and Historical processes.
diff --git a/docs/38.0.0/design/extensions-contrib/dropwizard.md b/docs/38.0.0/design/extensions-contrib/dropwizard.md
new file mode 100644
index 000000000..7e1100dc7
--- /dev/null
+++ b/docs/38.0.0/design/extensions-contrib/dropwizard.md
@@ -0,0 +1,95 @@
+---
+id: dropwizard
+layout: doc_page
+title: "Dropwizard metrics emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+# Dropwizard Emitter
+
+To use this extension, make sure to [include](../../configuration/extensions.md#loading-extensions) `dropwizard-emitter` in the extensions load list.
+
+## Introduction
+
+This extension integrates [Dropwizard](http://metrics.dropwizard.io/3.1.0/getting-started/#) metrics library with druid so that dropwizard users can easily absorb druid into their monitoring ecosystem.
+It accumulates druid metrics as dropwizard metrics, and emits them to various sinks via dropwizard supported reporters.
+Currently supported dropwizard metrics types counter, gauge, meter, timer and histogram.
+These metrics can be emitted using either Console or JMX reporter.
+
+To use this emitter, set
+
+```
+druid.emitter=dropwizard
+```
+
+## Configuration
+
+All the configuration parameters for Dropwizard emitter are under `druid.emitter.dropwizard`.
+
+|property|description|required?|default|
+|--------|-----------|---------|-------|
+|`druid.emitter.dropwizard.reporters`|List of dropwizard reporters to be used. Here is a list of [Supported Reporters](#supported-dropwizard-reporters)|yes|none|
+|`druid.emitter.dropwizard.prefix`|Optional prefix to be used for metrics name|no|none|
+|`druid.emitter.dropwizard.includeHost`|Flag to include the host and port as part of the metric name.|no|yes|
+|`druid.emitter.dropwizard.dimensionMapPath`|Path to JSON file defining the dropwizard metric type, and desired dimensions for every Druid metric|no|Default mapping provided. See below.|
+|`druid.emitter.dropwizard.alertEmitters`| List of emitters where alerts will be forwarded to. |no| empty list (no forwarding)|
+|`druid.emitter.dropwizard.maxMetricsRegistrySize`| Maximum size of metrics registry to be cached at any time. |no| 100 Mb|
+
+
+### Druid to Dropwizard Event Conversion
+
+Each metric emitted using Dropwizard must specify a type, one of `[timer, counter, guage, meter, histogram]`. Dropwizard Emitter expects this mapping to
+be provided as a JSON file. Additionally, this mapping specifies which dimensions should be included for each metric.
+If the user does not specify their own JSON file, a [default mapping](#default-metrics-mapping) is used.
+All metrics are expected to be mapped. Metrics which are not mapped will be ignored.
+Dropwizard metric path is organized using the following schema:
+
+`<druid metric name> : { "dimensions" : <dimension list>, "type" : <Dropwizard metric type>, "timeUnit" : <For timers, timeunit in which metric is emitted>}`
+
+e.g.
+```json
+"query/time" : { "dimensions" : ["dataSource", "type"], "type" : "timer", "timeUnit": "MILLISECONDS"},
+"segment/scan/pending" : { "dimensions" : [], "type" : "gauge"}
+```
+
+For most use-cases, the default mapping is sufficient.
+
+### Supported Dropwizard reporters
+
+#### JMX Reporter
+Used to report druid metrics via JMX.
+```
+
+druid.emitter.dropwizard.reporters=[{"type":"jmx"}]
+
+```
+
+#### Console Reporter
+Used to print Druid Metrics to console logs.
+
+```
+
+druid.emitter.dropwizard.reporters=[{"type":"console","emitIntervalInSecs":30}"}]
+
+```
+
+### Default Metrics Mapping
+Latest default metrics mapping can be found [here](https://github.com/apache/druid/blob/master/extensions-contrib/dropwizard-emitter/src/main/resources/defaultMetricDimensions.json)
diff --git a/docs/latest/design/historical.md b/docs/38.0.0/design/historical.md
similarity index 81%
copy from docs/latest/design/historical.md
copy to docs/38.0.0/design/historical.md
index d4a0782ba..4ddbaa9d4 100644
--- a/docs/latest/design/historical.md
+++ b/docs/38.0.0/design/historical.md
@@ -28,7 +28,7 @@ Historical services cache data segments on local disk and serve queries from tha
## Configuration
-For Apache Druid Historical service configuration, see [Historical configuration](../configuration/index.md#historical).
+For Apache® Druid Historical service configuration, see [Historical configuration](../configuration/index.md#historical).
For basic tuning guidance for the Historical service, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#historical).
@@ -47,13 +47,13 @@ org.apache.druid.cli.Main server historical
Each Historical service copies or pulls segment files from deep storage to local disk in an area called the segment cache. To configure the size and location of the segment cache on each Historical service, set the `druid.segmentCache.locations`.
For more information, see [Segment cache size](../operations/basic-cluster-tuning.md#segment-cache-size).
-The [Coordinator](../design/coordinator.md) controls the assignment of segments to Historicals and the balance of segments between Historicals. Historical services do not communicate directly with each other, nor do they communicate directly with the Coordinator. Instead, the Coordinator creates ephemeral entries in ZooKeeper in a [load queue path](../configuration/index.md#path-configuration). Each Historical service maintains a connection to ZooKeeper, watching those paths for segment [...]
+The [Coordinator](../design/coordinator.md) controls the assignment of segments to Historicals and the balance of segments between Historicals. Historical services do not communicate directly with each other. The Coordinator sends segment load and drop requests to each Historical over HTTP, and each Historical exposes an HTTP endpoint for the Coordinator to poll for the current state of its segment assignments.
-When a Historical service detects a new entry in the ZooKeeper load queue, it checks its own segment cache. If no information about the segment exists there, the Historical service first retrieves metadata from ZooKeeper about the segment, including where the segment is located in deep storage and how it needs to decompress and process it.
+When a Historical service receives a load request, it checks its own segment cache. If no information about the segment exists there, the Historical uses the segment metadata included in the request — including where the segment is located in deep storage and how to decompress and process it — to pull the segment from deep storage.
For more information about segment metadata and Druid segments in general, see [Segments](../design/segments.md).
-After a Historical service pulls down and processes a segment from deep storage, Druid advertises the segment as being available for queries from the Broker. This announcement by the Historical is made via ZooKeeper, in a [served segments path](../configuration/index.md#path-configuration).
+After a Historical service pulls down and processes a segment from deep storage, Druid advertises the segment as being available for queries from the Broker. The Historical exposes its current set of served segments via an HTTP endpoint (`/druid-internal/v1/segments`), which the Broker polls to learn what data each Historical is serving.
For more information about how the Broker determines what data is available for queries, see [Broker](broker.md).
diff --git a/docs/latest/design/index.md b/docs/38.0.0/design/index.md
similarity index 96%
copy from docs/latest/design/index.md
copy to docs/38.0.0/design/index.md
index 4d4655a9b..96f9051f0 100644
--- a/docs/latest/design/index.md
+++ b/docs/38.0.0/design/index.md
@@ -22,7 +22,7 @@ title: "Introduction to Apache Druid"
~ under the License.
-->
-Apache Druid is a real-time analytics database designed for fast slice-and-dice analytics ("[OLAP](http://en.wikipedia.org/wiki/Online_analytical_processing)" queries) on large data sets. Most often, Druid powers use cases where real-time ingestion, fast query performance, and high uptime are important.
+Apache® Druid is a real-time analytics database designed for fast slice-and-dice analytics ("[OLAP](http://en.wikipedia.org/wiki/Online_analytical_processing)" queries) on large data sets. Most often, Druid powers use cases where real-time ingestion, fast query performance, and high uptime are important.
Druid is commonly used as the database backend for GUIs of analytical applications, or for highly-concurrent APIs that need fast aggregations. Druid works best with event-oriented data.
diff --git a/docs/latest/design/indexer.md b/docs/38.0.0/design/indexer.md
similarity index 91%
copy from docs/latest/design/indexer.md
copy to docs/38.0.0/design/indexer.md
index 4b695b290..56bafbb62 100644
--- a/docs/latest/design/indexer.md
+++ b/docs/38.0.0/design/indexer.md
@@ -25,10 +25,10 @@ sidebar_label: "Indexer"
-->
:::info
- The Indexer is an optional and experimental feature. If you're primarily performing batch ingestion, we recommend you use either the MiddleManager and Peon task execution system or [MiddleManager-less ingestion using Kubernetes](../development/extensions-core/k8s-jobs.md). If you're primarily doing streaming ingestion, you may want to try either [MiddleManager-less ingestion using Kubernetes](../development/extensions-core/k8s-jobs.md) or the Indexer service.
+ The Indexer is an optional and experimental feature. If you're primarily performing batch ingestion, we recommend you use either the MiddleManager and Peon task execution system or [MiddleManager-less ingestion using Kubernetes®](../development/extensions-core/k8s-jobs.md). If you're primarily doing streaming ingestion, you may want to try either [MiddleManager-less ingestion using Kubernetes](../development/extensions-core/k8s-jobs.md) or the Indexer service.
:::
-The Apache Druid Indexer service is an alternative to the Middle Manager + Peon task execution system. Instead of forking a separate JVM process per-task, the Indexer runs tasks as separate threads within a single JVM process.
+The Apache® Druid Indexer service is an alternative to the Middle Manager + Peon task execution system. Instead of forking a separate JVM process per-task, the Indexer runs tasks as separate threads within a single JVM process.
The Indexer is designed to be easier to configure and deploy compared to the Middle Manager + Peon system and to better enable resource sharing across tasks.
diff --git a/docs/latest/design/indexing-service.md b/docs/38.0.0/design/indexing-service.md
similarity index 93%
copy from docs/latest/design/indexing-service.md
copy to docs/38.0.0/design/indexing-service.md
index d7dde33ec..ae191374c 100644
--- a/docs/latest/design/indexing-service.md
+++ b/docs/38.0.0/design/indexing-service.md
@@ -23,7 +23,7 @@ title: "Indexing Service"
-->
-The Apache Druid indexing service is a highly-available, distributed service that runs indexing related tasks.
+The Apache® Druid indexing service is a highly-available, distributed service that runs indexing related tasks.
Indexing [tasks](../ingestion/tasks.md) are responsible for creating and [killing](../ingestion/tasks.md#kill) Druid [segments](../design/segments.md).
diff --git a/docs/latest/design/metadata-storage.md b/docs/38.0.0/design/metadata-storage.md
similarity index 98%
copy from docs/latest/design/metadata-storage.md
copy to docs/38.0.0/design/metadata-storage.md
index 8071753f3..90bcc1bbf 100644
--- a/docs/latest/design/metadata-storage.md
+++ b/docs/38.0.0/design/metadata-storage.md
@@ -23,7 +23,7 @@ title: "Metadata storage"
-->
-Apache Druid relies on an external dependency for metadata storage.
+Apache® Druid relies on an external dependency for metadata storage.
Druid uses the metadata store to house various metadata about the system, but not to store the actual data.
The metadata store retains all metadata essential for a Druid cluster to work.
diff --git a/docs/latest/design/middlemanager.md b/docs/38.0.0/design/middlemanager.md
similarity index 91%
copy from docs/latest/design/middlemanager.md
copy to docs/38.0.0/design/middlemanager.md
index 9037b56a6..05ff2abab 100644
--- a/docs/latest/design/middlemanager.md
+++ b/docs/38.0.0/design/middlemanager.md
@@ -28,7 +28,7 @@ Druid uses separate JVMs for tasks to isolate resources and logs. Each Peon is c
## Configuration
-For Apache Druid Middle Manager service configuration, see [Middle Manager and Peons](../configuration/index.md#middle-manager-and-peon).
+For Apache® Druid Middle Manager service configuration, see [Middle Manager and Peons](../configuration/index.md#middle-manager-and-peon).
For basic tuning guidance for the Middle Manager service, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#middle-manager).
diff --git a/docs/latest/design/overlord.md b/docs/38.0.0/design/overlord.md
similarity index 96%
copy from docs/latest/design/overlord.md
copy to docs/38.0.0/design/overlord.md
index d8458e750..fb3c0aded 100644
--- a/docs/latest/design/overlord.md
+++ b/docs/38.0.0/design/overlord.md
@@ -31,7 +31,7 @@ This mode is recommended if you intend to use the indexing service as the single
## Configuration
-For Apache Druid Overlord service configuration, see [Overlord Configuration](../configuration/index.md#overlord).
+For Apache® Druid Overlord service configuration, see [Overlord Configuration](../configuration/index.md#overlord).
For basic tuning guidance for the Overlord service, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#overlord).
diff --git a/docs/latest/design/peons.md b/docs/38.0.0/design/peons.md
similarity index 88%
copy from docs/latest/design/peons.md
copy to docs/38.0.0/design/peons.md
index b31bd8ec1..3a029856f 100644
--- a/docs/latest/design/peons.md
+++ b/docs/38.0.0/design/peons.md
@@ -27,7 +27,7 @@ The Peon service is a task execution engine spawned by the Middle Manager. Each
## Configuration
-For Apache Druid Peon configuration, see [Peon Query Configuration](../configuration/index.md#peon-query-configuration) and [Additional Peon Configuration](../configuration/index.md#additional-peon-configuration).
+For Apache® Druid Peon configuration, see [Peon Query Configuration](../configuration/index.md#peon-query-configuration) and [Additional Peon Configuration](../configuration/index.md#additional-peon-configuration).
For basic tuning guidance for Middle Manager tasks, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#task-configurations).
diff --git a/docs/latest/design/router.md b/docs/38.0.0/design/router.md
similarity index 98%
copy from docs/latest/design/router.md
copy to docs/38.0.0/design/router.md
index ffe9358e4..15ec0495a 100644
--- a/docs/latest/design/router.md
+++ b/docs/38.0.0/design/router.md
@@ -31,7 +31,7 @@ In addition to query routing, the Router also runs the [web console](../operatio
## Configuration
-For Apache Druid Router service configuration, see [Router configuration](../configuration/index.md#router).
+For Apache® Druid Router service configuration, see [Router configuration](../configuration/index.md#router).
For basic tuning guidance for the Router service, see [Basic cluster tuning](../operations/basic-cluster-tuning.md#router).
diff --git a/docs/latest/design/segments.md b/docs/38.0.0/design/segments.md
similarity index 95%
copy from docs/latest/design/segments.md
copy to docs/38.0.0/design/segments.md
index 7bf9c1b88..f69bc666d 100644
--- a/docs/latest/design/segments.md
+++ b/docs/38.0.0/design/segments.md
@@ -23,7 +23,7 @@ title: "Segments"
-->
-Apache Druid stores its data and indexes in *segment files* partitioned by time. Druid creates a segment for each segment interval that contains data. If an interval is empty—that is, containing no rows—no segment exists for that time interval. Druid may create multiple segments for the same interval if you ingest data for that period via different ingestion jobs. [Compaction](../data-management/compaction.md) is the Druid process that attempts to combine these segments into a single seg [...]
+Apache® Druid stores its data and indexes in *segment files* partitioned by time. Druid creates a segment for each segment interval that contains data. If an interval is empty—that is, containing no rows—no segment exists for that time interval. Druid may create multiple segments for the same interval if you ingest data for that period via different ingestion jobs. [Compaction](../data-management/compaction.md) is the Druid process that attempts to combine these segments into a [...]
The time interval is configurable in the `segmentGranularity` parameter of the [`granularitySpec`](../ingestion/ingestion-spec.md#granularityspec).
diff --git a/docs/38.0.0/design/storage.md b/docs/38.0.0/design/storage.md
new file mode 100644
index 000000000..cb237c841
--- /dev/null
+++ b/docs/38.0.0/design/storage.md
@@ -0,0 +1,140 @@
+---
+id: storage
+title: "Storage overview"
+sidebar_label: "Storage"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Druid stores data in datasources, which are similar to tables in a traditional RDBMS. Each datasource is partitioned by time and, optionally, further partitioned by other attributes. Each time range is called a chunk (for example, a single day, if your datasource is partitioned by day). Within a chunk, data is partitioned into one or more [segments](../design/segments.md). Each segment is a single file, typically comprising up to a few million rows of data. Since segments are organized i [...]
+
+
+
+A datasource may have anywhere from just a few segments, up to hundreds of thousands and even millions of segments. Each segment is created by a Middle Manager as mutable and uncommitted. Data is queryable as soon as it is added to an uncommitted segment. The segment building process accelerates later queries by producing a data file that is compact and indexed:
+
+- Conversion to columnar format
+- Indexing with bitmap indexes
+- Compression
+ - Dictionary encoding with id storage minimization for String columns
+ - Bitmap compression for bitmap indexes
+ - Type-aware compression for all columns
+
+Periodically, segments are committed and published to [deep storage](deep-storage.md), become immutable, and move from Middle Managers to the Historical services. An entry about the segment is also written to the [metadata store](metadata-storage.md). This entry is a self-describing bit of metadata about the segment, including things like the schema of the segment, its size, and its location on deep storage. These entries tell the Coordinator what data is available on the cluster.
+
+For details on the segment file format, see [segment files](segments.md).
+
+For details on modeling your data in Druid, see [schema design](../ingestion/schema-design.md).
+
+## Indexing and handoff
+
+Indexing is the mechanism by which new segments are created, and handoff is the mechanism by which they are published and served by Historical services.
+
+On the indexing side:
+
+1. An indexing task starts running and building a new segment. It must determine the identifier of the segment before it starts building it. For a task that is appending (like a Kafka task, or an index task in append mode) this is done by calling an "allocate" API on the Overlord to potentially add a new partition to an existing set of segments. For
+a task that is overwriting (an index task not in append mode) this is done by locking an interval and creating a new version number and new set of segments.
+2. If the indexing task is a realtime task (like a Kafka task) then the segment is immediately queryable at this point. It's available, but unpublished.
+3. When the indexing task has finished reading data for the segment, it pushes it to deep storage and then publishes it by writing a record into the metadata store.
+4. If the indexing task is a realtime task, then to ensure data is continuously available for queries, it waits for a Historical service to load the segment. If the indexing task is not a realtime task, it exits immediately.
+
+On the Coordinator / Historical side:
+
+1. The Coordinator polls the metadata store periodically (by default, every 1 minute) for newly published segments.
+2. When the Coordinator finds a segment that is published and used, but unavailable, it chooses a Historical service to load that segment and instructs that Historical to do so.
+3. The Historical loads the segment and begins serving it.
+4. At this point, if the indexing task was waiting for handoff, it will exit.
+
+## Segment identifiers
+
+Segments all have a four-part identifier with the following components:
+
+- Datasource name.
+- Time interval for the time chunk containing the segment; this corresponds to the `segmentGranularity` specified at ingestion time. Uses the same format as [query granularity](../querying/granularities.md).
+- Version number (generally an ISO8601 timestamp corresponding to when the segment set was first started).
+- Partition number (an integer, unique within a datasource+interval+version; may not necessarily be contiguous).
+
+For example, this is the identifier for a segment in datasource `clarity-cloud0`, time chunk
+`2018-05-21T16:00:00.000Z/2018-05-21T17:00:00.000Z`, version `2018-05-21T15:56:09.909Z`, and partition number 1:
+
+```
+clarity-cloud0_2018-05-21T16:00:00.000Z_2018-05-21T17:00:00.000Z_2018-05-21T15:56:09.909Z_1
+```
+
+Segments with partition number 0 (the first partition in a chunk) omit the partition number, like the following example, which is a segment in the same time chunk as the previous one, but with partition number 0 instead of 1:
+
+```
+clarity-cloud0_2018-05-21T16:00:00.000Z_2018-05-21T17:00:00.000Z_2018-05-21T15:56:09.909Z
+```
+
+## Segment versioning
+
+The version number provides a form of [multi-version concurrency control](https://en.wikipedia.org/wiki/Multiversion_concurrency_control) (MVCC) to support batch-mode overwriting. If all you ever do is append data, then there will be just a single version for each time chunk. But when you overwrite data, Druid will seamlessly switch from querying the old version to instead query the new, updated versions. Specifically, a new set of segments is created with the same datasource, same time [...]
+
+The switch appears to happen instantaneously to a user, because Druid handles this by first loading the new data (but not allowing it to be queried), and then, as soon as the new data is all loaded, switching all new queries to use those new segments. Then it drops the old segments a few minutes later.
+
+## Segment lifecycle
+
+Each segment has a lifecycle that involves the following three major areas:
+
+1. **Metadata store:** Segment metadata (a small JSON payload generally no more than a few KB) is stored in the [metadata store](metadata-storage.md) once a segment is done being constructed. The act of inserting a record for a segment into the metadata store is called publishing. These metadata records have a boolean flag named `used`, which controls whether the segment is intended to be queryable or not. Segments created by realtime tasks will be
+available before they are published, since they are only published when the segment is complete and will not accept any additional rows of data.
+2. **Deep storage:** Segment data files are pushed to deep storage once a segment is done being constructed. This happens immediately before publishing metadata to the metadata store.
+3. **Availability for querying:** Segments are available for querying on some Druid data server, like a realtime task, directly from deep storage, or a Historical service.
+
+You can inspect the state of currently active segments using the Druid SQL
+[`sys.segments` table](../querying/sql-metadata-tables.md#segments-table). It includes the following flags:
+
+- `is_published`: True if segment metadata has been published to the metadata store and `used` is true.
+- `is_available`: True if the segment is currently available for querying, either on a realtime task or Historical service.
+- `is_realtime`: True if the segment is only available on realtime tasks. For datasources that use realtime ingestion, this will generally start off `true` and then become `false` as the segment is published and handed off.
+- `is_overshadowed`: True if the segment is published (with `used` set to true) and is fully overshadowed by some other published segments. Generally this is a transient state, and segments in this state will soon have their `used` flag automatically set to false.
+
+## Availability and consistency
+
+Druid has an architectural separation between ingestion and querying, as described above in
+[Indexing and handoff](#indexing-and-handoff). This means that when understanding Druid's availability and consistency properties, we must look at each function separately.
+
+On the ingestion side, Druid's primary [ingestion methods](../ingestion/index.md#ingestion-methods) are all pull-based and offer transactional guarantees. This means that you are guaranteed that ingestion using these methods will publish in an all-or-nothing manner:
+
+- Supervised "seekable-stream" ingestion methods like [Kafka](../ingestion/kafka-ingestion.md) and [Kinesis](../ingestion/kinesis-ingestion.md). With these methods, Druid commits stream offsets to its [metadata store](metadata-storage.md) alongside segment metadata, in the same transaction. Note that ingestion of data that has not yet been published can be rolled back if ingestion tasks fail. In this case, partially-ingested data is
+discarded, and Druid will resume ingestion from the last committed set of stream offsets. This ensures exactly-once publishing behavior.
+- [SQL REPLACE](../multi-stage-query/reference.md#replace) statements. The controller task publishes all segment metadata when the statement is finished executing.
+- [Native batch ingestion](../ingestion/native-batch.md). In parallel mode, the supervisor task publishes all segment metadata in a single transaction after the subtasks are finished. In simple (single-task) mode, the single task publishes all segment metadata in a single transaction after it is complete.
+
+Additionally, some ingestion methods offer an _idempotency_ guarantee. This means that repeated executions of the same ingestion will not cause duplicate data to be ingested:
+
+- Supervised "seekable-stream" ingestion methods like [Kafka](../ingestion/kafka-ingestion.md) and [Kinesis](../ingestion/kinesis-ingestion.md) are idempotent due to the fact that stream offsets and segment metadata are stored together and updated in lock-step.
+- [SQL REPLACE](../multi-stage-query/reference.md#replace) statements are idempotent unless reading from the same Druid datasource that you are ingesting into. In this case, running the same task twice is non-idempotent, because you are adding to existing data instead of overwriting it.
+- [Native batch ingestion](../ingestion/native-batch.md) is idempotent unless
+[`appendToExisting`](../ingestion/native-batch.md) is true, or one of your input sources is the same Druid datasource that you are ingesting into. In either of these two cases, running the same task twice is non-idempotent, because you are adding to existing data instead of overwriting it.
+
+On the query side, the Druid Broker is responsible for ensuring that a consistent set of segments is involved in a given query. It selects the appropriate set of segment versions to use when the query starts based on what is currently available. This is supported by atomic replacement, a feature that ensures that from a user's perspective, queries flip instantaneously from an older version of data to a newer set of data, with no consistency or performance impact.
+This is used for SQL REPLACE statements, native batch ingestion when `appendToExisting` is false, and compaction.
+
+Note that atomic replacement happens for each time chunk individually. If a batch ingestion task or compaction involves multiple time chunks, then each time chunk will undergo atomic replacement soon after the task finishes, but the replacements will not all happen simultaneously.
+
+Typically, atomic replacement in Druid is based on a core set concept that works in conjunction with segment versions.
+When a time chunk is overwritten, a new core set of segments is created with a higher version number. The core set must all be available before the Broker will use them instead of the older set. There can also only be one core set per version per time chunk. Druid will also only use a single version at a time per time chunk. Together, these properties provide Druid's atomic replacement guarantees.
+
+Druid also supports a deprecated segment locking mode that is activated by setting
+[`forceTimeChunkLock`](../ingestion/tasks.md#context-parameters) to false in the context of an ingestion task. In this case, Druid creates an atomic update group using the existing version for the time chunk, instead of creating a new core set with a new version number. There can be multiple atomic update groups with the same version number per time chunk. Each one replaces a specific set of earlier segments in the same time chunk and with the same version number. Druid will query the la [...]
+
+If segments become unavailable due to multiple Historicals going offline simultaneously (beyond your replication factor), then Druid queries will include only the segments that are still available. In the background, Druid will reload these unavailable segments on other Historicals as quickly as possible, at which point they will be included in queries again.
diff --git a/docs/38.0.0/design/zookeeper.md b/docs/38.0.0/design/zookeeper.md
new file mode 100644
index 000000000..6b6267e9c
--- /dev/null
+++ b/docs/38.0.0/design/zookeeper.md
@@ -0,0 +1,66 @@
+---
+id: zookeeper
+title: "ZooKeeper"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Apache® Druid uses [Apache® ZooKeeper](http://zookeeper.apache.org/) (ZK) for management of current cluster state.
+
+## Minimum ZooKeeper versions
+
+Apache Druid supports all stable versions of ZooKeeper. For information about ZooKeeper's stable version, see [ZooKeeper releases](https://zookeeper.apache.org/releases.html).
+
+## ZooKeeper operations
+
+The operations that happen over ZK are:
+
+1. [Coordinator](../design/coordinator.md) leader election
+2. [Overlord](../design/overlord.md) leader election
+3. Service (node) announcement and discovery — services announce their presence so other services can find them
+
+Segment loading, segment discovery, and Overlord ↔ Middle Manager task management no longer use ZooKeeper — they are served over HTTP.
+
+## Coordinator leader election
+
+Druid uses the Curator [LeaderLatch](https://curator.apache.org/docs/recipes-leader-latch) recipe to perform leader election at path
+
+```
+${druid.zk.paths.coordinatorPath}/_COORDINATOR
+```
+
+## Overlord leader election
+
+Druid uses the same [LeaderLatch](https://curator.apache.org/docs/recipes-leader-latch) recipe for Overlord leader election at path
+
+```
+${druid.zk.paths.overlordPath}/_OVERLORD
+```
+
+## Service announcement and discovery
+
+Each Druid service announces a `DruidNode` record (host, port, role, services) under the internal-discovery path so that other services can enumerate cluster members by role:
+
+```
+${druid.zk.paths.base}/internal-discovery/${nodeRole}/${druid.host}
+```
+
+Brokers and Coordinators use this path to find Historicals, Peons, and Indexers. They then poll each discovered service's HTTP `/druid-internal/v1/segments` endpoint to get its current set of served segments.
diff --git a/docs/latest/development/build.md b/docs/38.0.0/development/build.md
similarity index 96%
copy from docs/latest/development/build.md
copy to docs/38.0.0/development/build.md
index 3bfaca192..902c22647 100644
--- a/docs/latest/development/build.md
+++ b/docs/38.0.0/development/build.md
@@ -23,7 +23,7 @@ title: "Build from source"
-->
-You can build Apache Druid directly from source. Use the version of this page
+You can build Apache® Druid directly from source. Use the version of this page
that matches the version you want to build.
For building the latest code in master, follow the latest version of this page
[here](https://github.com/apache/druid/blob/master/docs/development/build.md):
@@ -33,7 +33,7 @@ make sure it has `/master/` in the URL.
### Installing Java and Maven
-- See our [Java documentation](../operations/java.md) for information about obtaining a supported JDK
+- See the [Java documentation](../operations/java.md) for information about obtaining a supported JDK
- [Maven version 3.x](http://maven.apache.org/download.cgi)
### Other Dependencies
diff --git a/docs/latest/development/docs-contribute.md b/docs/38.0.0/development/docs-contribute.md
similarity index 97%
copy from docs/latest/development/docs-contribute.md
copy to docs/38.0.0/development/docs-contribute.md
index 270713e15..be6e855cd 100644
--- a/docs/latest/development/docs-contribute.md
+++ b/docs/38.0.0/development/docs-contribute.md
@@ -22,7 +22,7 @@ title: "Contribute to Druid docs"
~ under the License.
-->
-Apache Druid is a [community-led project](https://druid.apache.org/community/). We are delighted to receive contributions to the docs ranging from minor fixes to big new features.
+Apache® Druid is a [community-led project](https://druid.apache.org/community/). We are delighted to receive contributions to the docs ranging from minor fixes to big new features.
Druid docs contributors:
diff --git a/docs/latest/operations/kubernetes.md b/docs/38.0.0/development/experimental.md
similarity index 54%
copy from docs/latest/operations/kubernetes.md
copy to docs/38.0.0/development/experimental.md
index 9d7b3b6c6..96a9b5085 100644
--- a/docs/latest/operations/kubernetes.md
+++ b/docs/38.0.0/development/experimental.md
@@ -1,6 +1,6 @@
---
-id: kubernetes
-title: "kubernetes"
+id: experimental
+title: "Experimental features"
---
<!--
@@ -23,12 +23,15 @@ title: "kubernetes"
-->
-Apache Druid distribution is also available as [Docker](https://www.docker.com/) image from [Docker Hub](https://hub.docker.com/r/apache/druid) . For example, you can obtain latest release using the command below.
+Features often start out in "experimental" status that indicates they are still evolving.
+This can mean any of the following things:
-```
-$ docker pull apache/druid
-```
+1. The feature's API may change even in minor releases or patch releases.
+2. The feature may have known "missing" pieces that will be added later.
+3. The feature may or may not have received full battle-testing in production environments.
-[druid-operator](https://github.com/datainfrahq/druid-operator) can be used to manage a Druid cluster on [Kubernetes](https://kubernetes.io/) .
+All experimental features are optional.
-Druid clusters deployed on Kubernetes can function without Zookeeper using [druid–kubernetes-extensions](../development/extensions-core/kubernetes.md) .
+Note that not all of these points apply to every experimental feature. Some have been battle-tested in terms of
+implementation, but are still marked experimental due to an evolving API. Please check the documentation for each
+feature for full details.
diff --git a/docs/38.0.0/development/extensions-contrib/aliyun-oss-extensions.md b/docs/38.0.0/development/extensions-contrib/aliyun-oss-extensions.md
new file mode 100644
index 000000000..ab0573bdc
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/aliyun-oss-extensions.md
@@ -0,0 +1,236 @@
+---
+id: aliyun-oss
+title: "Aliyun OSS"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+[Alibaba Cloud](https://www.aliyun.com) is the 3rd largest cloud infrastructure provider in the world. It provides its own storage solution known as OSS, [Object Storage Service](https://www.aliyun.com/product/oss).
+This document describes how to use OSS as Druid deep storage.
+
+## Installation
+
+Use the [pull-deps](../../operations/pull-deps.md) tool shipped with Druid to install the `aliyun-oss-extensions` extension, as described [here](../../configuration/extensions.md#community-extensions) on middle manager and historical nodes.
+
+```bash
+java -classpath "{YOUR_DRUID_DIR}/lib/*" org.apache.druid.cli.Main tools pull-deps -c org.apache.druid.extensions.contrib:aliyun-oss-extensions:{YOUR_DRUID_VERSION}
+```
+
+## Enabling
+
+After installation, add this `aliyun-oss-extensions` extension to `druid.extensions.loadList` in common.runtime.properties and then restart middle manager and historical nodes.
+
+## Configuration
+
+First add the following OSS configurations to common.runtime.properties
+
+|Property|Description|Required|
+|--------|---------------|-----------|
+|`druid.oss.accessKey`|The `AccessKey ID` of the account to be used to access the OSS bucket|yes|
+|`druid.oss.secretKey`|The `AccessKey Secret` of the account to be used to access the OSS bucket| yes|
+|`druid.oss.endpoint`|The endpoint URL of your OSS storage. <br/>If your Druid cluster is also hosted in the same region on Alibaba Cloud as the region of your OSS bucket, it's recommended to use the internal network endpoint url, so that any inbound and outbound traffic to the OSS bucket is free of charge. | yes|
+
+To use OSS as deep storage, add the following configurations:
+
+|Property|Description|Required|
+|--------|---------------|-----------|
+|`druid.storage.type`| Global deep storage provider. Must be set to `oss` to make use of this extension. |yes|
+|`druid.storage.oss.bucket`|Storage bucket name.| yes |
+|`druid.storage.oss.prefix`| Folder where segments will be published to. `druid/segments` is recommended. | No |
+
+If OSS is used as deep storage for segment files, it's also recommended saving index logs in the OSS too.
+To do this, add following configurations:
+
+|Property|Description|Required|
+|--------|---------------|-----------|
+|`druid.indexer.logs.type`| Global deep storage provider. Must be set to `oss` to make use of this extension. | yes |
+|`druid.indexer.logs.oss.bucket`|The bucket used to keep logs. It could be the same as `druid.storage.oss.bucket`| yes |
+|`druid.indexer.logs.oss.prefix`|Folder where log files will be published to. `druid/logs` is recommended. | no |
+
+
+## Reading data from OSS
+
+Currently, Web Console does not support ingestion from OSS, but it could be done by submitting an ingestion task with OSS's input source configuration.
+
+Below shows the configurations of OSS's input source.
+
+### OSS Input Source
+
+|property|description|Required|
+|--------|-----------|-------|
+|type|This should be `oss`.|yes|
+|uris|JSON array of URIs where OSS objects to be ingested are located.<br/>For example, `oss://{your_bucket}/{source_file_path}`|`uris` or `prefixes` or `objects` must be set|
+|prefixes|JSON array of URI prefixes for the locations of OSS objects to be ingested. Empty objects starting with one of the given prefixes will be skipped.|`uris` or `prefixes` or `objects` must be set|
+|objects|JSON array of [OSS Objects](#oss-object) to be ingested. |`uris` or `prefixes` or `objects` must be set|
+|properties|[Properties Object](#properties-object) for overriding the default OSS configuration. See below for more information.|no (defaults will be used if not given)
+
+#### OSS Object
+
+|Property|Description|Default|Required|
+|--------|-----------|-------|---------|
+|bucket|Name of the OSS bucket|None|yes|
+|path|The path where data is located.|None|yes|
+
+#### Properties Object
+
+|Property|Description|Default|Required|
+|--------|-----------|-------|---------|
+|accessKey|The [Password Provider](../../operations/password-provider.md) or plain text string of this OSS InputSource's access key|None|yes|
+|secretKey|The [Password Provider](../../operations/password-provider.md) or plain text string of this OSS InputSource's secret key|None|yes|
+|endpoint|The endpoint of this OSS InputSource|None|no|
+
+### Reading from a file
+
+Say that the file `rollup-data.json`, which can be found under Druid's `quickstart/tutorial` directory, has been uploaded to a folder `druid` in your OSS bucket, the bucket for which your Druid is configured.
+In this case, the `uris` property of the OSS's input source can be used for reading, as shown:
+
+```json
+{
+ "type" : "index_parallel",
+ "spec" : {
+ "dataSchema" : {
+ "dataSource" : "rollup-tutorial-from-oss",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "iso"
+ },
+ "dimensionsSpec" : {
+ "dimensions" : [
+ "srcIP",
+ "dstIP"
+ ]
+ },
+ "metricsSpec" : [
+ { "type" : "count", "name" : "count" },
+ { "type" : "longSum", "name" : "packets", "fieldName" : "packets" },
+ { "type" : "longSum", "name" : "bytes", "fieldName" : "bytes" }
+ ],
+ "granularitySpec" : {
+ "type" : "uniform",
+ "segmentGranularity" : "week",
+ "queryGranularity" : "minute",
+ "intervals" : ["2018-01-01/2018-01-03"],
+ "rollup" : true
+ }
+ },
+ "ioConfig" : {
+ "type" : "index_parallel",
+ "inputSource" : {
+ "type" : "oss",
+ "uris" : [
+ "oss://{YOUR_BUCKET_NAME}/druid/rollup-data.json"
+ ]
+ },
+ "inputFormat" : {
+ "type" : "json"
+ },
+ "appendToExisting" : false
+ },
+ "tuningConfig" : {
+ "type" : "index_parallel",
+ "maxRowsPerSegment" : 5000000,
+ "maxRowsInMemory" : 25000
+ }
+ }
+}
+```
+
+By posting the above ingestion task spec to `http://{YOUR_ROUTER_IP}:8888/druid/indexer/v1/task`, an ingestion task will be created by the indexing service to ingest.
+
+### Reading files in folders
+
+If we want to read files in a same folder, we could use the `prefixes` property to specify the folder name where Druid could find input files instead of specifying file URIs one by one.
+
+```json
+...
+ "ioConfig" : {
+ "type" : "index_parallel",
+ "inputSource" : {
+ "type" : "oss",
+ "prefixes" : [
+ "oss://{YOUR_BUCKET_NAME}/2020", "oss://{YOUR_BUCKET_NAME}/2021"
+ ]
+ },
+ "inputFormat" : {
+ "type" : "json"
+ },
+ "appendToExisting" : false
+ }
+...
+```
+
+The spec above tells the ingestion task to read all files under `2020` and `2021` folders.
+
+### Reading from other buckets
+
+If you want to read from files in buckets which are different from the bucket Druid is configured, use `objects` property of OSS's InputSource for task submission as below:
+
+```json
+...
+ "ioConfig" : {
+ "type" : "index_parallel",
+ "inputSource" : {
+ "type" : "oss",
+ "objects" : [
+ {"bucket": "YOUR_BUCKET_NAME", "path": "druid/rollup-data.json"}
+ ]
+ },
+ "inputFormat" : {
+ "type" : "json"
+ },
+ "appendToExisting" : false
+ }
+...
+```
+
+### Reading with customized accessKey
+
+If the default `druid.oss.accessKey` is not able to access a bucket, `properties` could be used to customize these secret information as below:
+
+```json
+...
+ "ioConfig" : {
+ "type" : "index_parallel",
+ "inputSource" : {
+ "type" : "oss",
+ "objects" : [
+ {"bucket": "YOUR_BUCKET_NAME", "path": "druid/rollup-data.json"}
+ ],
+ "properties": {
+ "endpoint": "YOUR_ENDPOINT_OF_BUCKET",
+ "accessKey": "YOUR_ACCESS_KEY",
+ "secretKey": "YOUR_SECRET_KEY"
+ }
+ },
+ "inputFormat" : {
+ "type" : "json"
+ },
+ "appendToExisting" : false
+ }
+...
+```
+
+This `properties` could be applied to any of `uris`, `objects`, `prefixes` property above.
+
+
+## Troubleshooting
+
+When using OSS as deep storage or reading from OSS, the most problems that users will encounter are related to OSS permission.
+Please refer to the official [OSS permission troubleshooting document](https://www.alibabacloud.com/help/doc-detail/42777.htm) to find a solution.
diff --git a/docs/38.0.0/development/extensions-contrib/ambari-metrics-emitter.md b/docs/38.0.0/development/extensions-contrib/ambari-metrics-emitter.md
new file mode 100644
index 000000000..ee82ca6d7
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/ambari-metrics-emitter.md
@@ -0,0 +1,98 @@
+---
+id: ambari-metrics-emitter
+title: "Ambari Metrics Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `ambari-metrics-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits Druid metrics to an ambari-metrics carbon server. Events are sent after been pickled (i.e., batched). The size of the batch is configurable.
+
+## Configuration
+
+All the configuration parameters for ambari-metrics emitter are under `druid.emitter.ambari-metrics`.
+
+|property|description|required?|default|
+|--------|-----------|---------|-------|
+|`druid.emitter.ambari-metrics.hostname`|The hostname of the ambari-metrics server.|yes|none|
+|`druid.emitter.ambari-metrics.port`|The port of the ambari-metrics server.|yes|none|
+|`druid.emitter.ambari-metrics.protocol`|The protocol used to send metrics to ambari metrics collector. One of http/https|no|http|
+|`druid.emitter.ambari-metrics.trustStorePath`|Path to trustStore to be used for https|no|none|
+|`druid.emitter.ambari-metrics.trustStoreType`|trustStore type to be used for https|no|none|
+|`druid.emitter.ambari-metrics.trustStoreType`|trustStore password to be used for https|no|none|
+|`druid.emitter.ambari-metrics.batchSize`|Number of events to send as one batch.|no|100|
+|`druid.emitter.ambari-metrics.eventConverter`| Filter and converter of druid events to ambari-metrics timeline event(please see next section). |yes|none|
+|`druid.emitter.ambari-metrics.flushPeriod` | Queue flushing period in milliseconds. |no|1 minute|
+|`druid.emitter.ambari-metrics.maxQueueSize`| Maximum size of the queue used to buffer events. |no|`MAX_INT`|
+|`druid.emitter.ambari-metrics.alertEmitters`| List of emitters where alerts will be forwarded to. |no| empty list (no forwarding)|
+|`druid.emitter.ambari-metrics.emitWaitTime` | wait time in milliseconds to try to send the event otherwise emitter will throwing event. |no|0|
+|`druid.emitter.ambari-metrics.waitForEventTime` | waiting time in milliseconds if necessary for an event to become available. |no|1000 (1 sec)|
+
+### Druid to Ambari Metrics Timeline Event Converter
+
+Ambari Metrics Timeline Event Converter defines a mapping between druid metrics name plus dimensions to a timeline event metricName.
+ambari-metrics metric path is organized using the following schema:
+`<namespacePrefix>.[<druid service name>].[<druid hostname>].<druid metrics dimensions>.<druid metrics name>`
+Properly naming the metrics is critical to avoid conflicts, confusing data and potentially wrong interpretation later on.
+
+Example `druid.historical.hist-host1:8080.MyDataSourceName.GroupBy.query/time`:
+
+ * `druid` -> namespace prefix
+ * `historical` -> service name
+ * `hist-host1:8080` -> druid hostname
+ * `MyDataSourceName` -> dimension value
+ * `GroupBy` -> dimension value
+ * `query/time` -> metric name
+
+We have two different implementation of event converter:
+
+#### Send-All converter
+
+The first implementation called `all`, will send all the druid service metrics events.
+The path will be in the form `<namespacePrefix>.[<druid service name>].[<druid hostname>].<dimensions values ordered by dimension's name>.<metric>`
+User has control of `<namespacePrefix>.[<druid service name>].[<druid hostname>].`
+
+```json
+
+druid.emitter.ambari-metrics.eventConverter={"type":"all", "namespacePrefix": "druid.test", "appName":"druid"}
+
+```
+
+#### White-list based converter
+
+The second implementation called `whiteList`, will send only the white listed metrics and dimensions.
+Same as for the `all` converter user has control of `<namespacePrefix>.[<druid service name>].[<druid hostname>].`
+White-list based converter comes with the following default white list map located under resources in `./src/main/resources/defaultWhiteListMap.json`
+
+Although user can override the default white list map by supplying a property called `mapPath`.
+This property is a String containing the path for the file containing **white list map JSON object**.
+For example the following converter will read the map from the file `/pathPrefix/fileName.json`.
+
+```json
+
+druid.emitter.ambari-metrics.eventConverter={"type":"whiteList", "namespacePrefix": "druid.test", "ignoreHostname":true, "appName":"druid", "mapPath":"/pathPrefix/fileName.json"}
+
+```
+
+**Druid emits a huge number of metrics we highly recommend to use the `whiteList` converter**
diff --git a/docs/latest/development/extensions-core/orc.md b/docs/38.0.0/development/extensions-contrib/cassandra.md
similarity index 64%
copy from docs/latest/development/extensions-core/orc.md
copy to docs/38.0.0/development/extensions-contrib/cassandra.md
index cd9125155..916bacb91 100644
--- a/docs/latest/development/extensions-core/orc.md
+++ b/docs/38.0.0/development/extensions-contrib/cassandra.md
@@ -1,6 +1,6 @@
---
-id: orc
-title: "ORC Extension"
+id: cassandra
+title: "Apache Cassandra"
---
<!--
@@ -22,12 +22,9 @@ title: "ORC Extension"
~ under the License.
-->
-## ORC extension
-This Apache Druid extension enables Druid to ingest and understand the Apache ORC data format.
-
-The extension provides the [ORC input format](../../ingestion/data-formats.md#orc)
-for [native batch ingestion](../../ingestion/native-batch.md).
-
-To use this extension, make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-orc-extensions` in the extensions load list.
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-cassandra-storage` in the extensions load list.
+[Apache Cassandra](http://www.datastax.com/what-we-offer/products-services/datastax-enterprise/apache-cassandra) can also
+be leveraged for deep storage. This requires some additional Druid configuration as well as setting up the necessary
+schema within a Cassandra keystore.
diff --git a/docs/38.0.0/development/extensions-contrib/cloudfiles.md b/docs/38.0.0/development/extensions-contrib/cloudfiles.md
new file mode 100644
index 000000000..d4e7592ee
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/cloudfiles.md
@@ -0,0 +1,42 @@
+---
+id: cloudfiles
+title: "Rackspace Cloud Files"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-cloudfiles-extensions` in the extensions load list.
+
+## Deep Storage
+
+[Rackspace Cloud Files](http://www.rackspace.com/cloud/files/) is another option for deep storage. This requires some additional Druid configuration.
+
+|Property|Possible Values|Description|Default|
+|--------|---------------|-----------|-------|
+|`druid.storage.type`|cloudfiles||Must be set.|
+|`druid.storage.region`||Rackspace Cloud Files region.|Must be set.|
+|`druid.storage.container`||Rackspace Cloud Files container name.|Must be set.|
+|`druid.storage.basePath`||Rackspace Cloud Files base path to use in the container.|Must be set.|
+|`druid.storage.operationMaxRetries`||Number of tries before cancel a Rackspace operation.|10|
+|`druid.cloudfiles.userName`||Rackspace Cloud username|Must be set.|
+|`druid.cloudfiles.apiKey`||Rackspace Cloud API key.|Must be set.|
+|`druid.cloudfiles.provider`|rackspace-cloudfiles-us,rackspace-cloudfiles-uk|Name of the provider depending on the region.|Must be set.|
+|`druid.cloudfiles.useServiceNet`|true,false|Whether to use the internal service net.|true|
diff --git a/docs/38.0.0/development/extensions-contrib/compressed-big-decimal.md b/docs/38.0.0/development/extensions-contrib/compressed-big-decimal.md
new file mode 100644
index 000000000..28a52185f
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/compressed-big-decimal.md
@@ -0,0 +1,280 @@
+---
+id: compressed-big-decimal
+title: "Compressed Big Decimal"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+## Overview
+**Compressed Big Decimal** is an extension which provides support for Mutable big decimal value that can be used to accumulate values without losing precision or reallocating memory. This type helps in absolute precision arithmetic on large numbers in applications, where greater level of accuracy is required, such as financial applications, currency based transactions. This helps avoid rounding issues where in potentially large amount of money can be lost.
+
+Accumulation requires that the two numbers have the same scale, but does not require that they are of the same size. If the value being accumulated has a larger underlying array than this value (the result), then the higher order bits are dropped, similar to what happens when adding a long to an int and storing the result in an int. A compressed big decimal that holds its data with an embedded array.
+
+Compressed big decimal is an absolute number based complex type based on big decimal in Java. This supports all the functionalities supported by Java Big Decimal. Java Big Decimal is not mutable in order to avoid big garbage collection issues. Compressed big decimal is needed to mutate the value in the accumulator.
+
+#### Main enhancements provided by this extension:
+1. Functionality: Mutating Big decimal type with greater precision
+2. Accuracy: Provides greater level of accuracy in decimal arithmetic
+
+## Operations
+To use this extension, make sure to [load](../../configuration/extensions.md#loading-extensions) `druid-compressed-bigdecimal` to your config file.
+
+## Configuration
+There are currently no configuration properties specific to Compressed Big Decimal
+
+## Limitations
+* Compressed Big Decimal does not provide correct result when the value being accumulated has a larger underlying array than this value (the result), then the higher order bits are dropped, similar to what happens when adding a long to an int and storing the result in an int.
+
+
+### Ingestion Spec:
+* Most properties in the Ingest spec derived from [Ingestion Spec](../../ingestion/index.md) / [Data Formats](../../ingestion/data-formats.md)
+
+
+|property|description|required?|
+|--------|-----------|---------|
+|metricsSpec|Metrics Specification, In metrics specification while specifying metrics details such as name, type should be specified as compressedBigDecimal|Yes|
+
+### Query spec:
+* Most properties in the query spec derived from [groupBy query](../../querying/groupbyquery.md) / [timeseries](../../querying/timeseriesquery.md), see documentation for these query types.
+
+|property|description|required?|
+|--------|-----------|---------|
+|queryType|This String should always be either "groupBy" OR "timeseries"; this is the first thing Druid looks at to figure out how to interpret the query.|yes|
+|dataSource|A String or Object defining the data source to query, very similar to a table in a relational database. See [DataSource](../../querying/datasource.md) for more information.|yes|
+|dimensions|A JSON list of [DimensionSpec](../../querying/dimensionspecs.md) (Notice that property is optional)|no|
+|limitSpec|See [LimitSpec](../../querying/limitspec.md)|no|
+|having|See [Having](../../querying/having.md)|no|
+|granularity|A period granularity; See [Period Granularities](../../querying/granularities.md#period-granularities)|yes|
+|filter|See [Filters](../../querying/filters.md)|no|
+|aggregations|Aggregations forms the input to Averagers; See [Aggregations](../../querying/aggregations.md). The Aggregations must specify type, scale and size as follows for compressedBigDecimal Type ```"aggregations": [{"type": "compressedBigDecimal","name": "..","fieldName": "..","scale": [Numeric],"size": [Numeric]}```. Please refer query example in Examples section. |Yes|
+|postAggregations|Supports only aggregations as input; See [Post Aggregations](../../querying/post-aggregations.md)|no|
+|intervals|A JSON Object representing ISO-8601 Intervals. This defines the time ranges to run the query over.|yes|
+|context|An additional JSON Object which can be used to specify certain flags.|no|
+
+## Examples
+
+Consider the data as
+
+|Date|Item|SaleAmount|
+|--------|-----------|---------|
+
+```
+20201208,ItemA,0.0
+20201208,ItemB,10.000000000
+20201208,ItemA,-1.000000000
+20201208,ItemC,9999999999.000000000
+20201208,ItemB,5000000000.000000005
+20201208,ItemA,2.0
+20201208,ItemD,0.0
+```
+
+IngestionSpec syntax:
+
+```json
+{
+ "type": "index_parallel",
+ "spec": {
+ "dataSchema": {
+ "dataSource": "invoices",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "yyyyMMdd"
+ },
+ "dimensionsSpec": {
+ "dimensions": [{
+ "type": "string",
+ "name": "itemName"
+ }]
+ },
+ "metricsSpec": [{
+ "name": "saleAmount",
+ "type": "compressedBigDecimalSum",
+ "fieldName": "saleAmount"
+ }],
+ "transformSpec": {
+ "filter": null,
+ "transforms": []
+ },
+ "granularitySpec": {
+ "type": "uniform",
+ "rollup": false,
+ "segmentGranularity": "DAY",
+ "queryGranularity": "none",
+ "intervals": ["2020-12-08/2020-12-09"]
+ }
+ },
+ "ioConfig": {
+ "type": "index_parallel",
+ "inputSource": {
+ "type": "local",
+ "baseDir": "/home/user/sales/data/staging/invoice-data",
+ "filter": "invoice-001.20201208.txt"
+ },
+ "inputFormat": {
+ "type": "tsv",
+ "delimiter": ",",
+ "skipHeaderRows": 0,
+ "columns": [
+ "timestamp",
+ "itemName",
+ "saleAmount"
+ ]
+ }
+ },
+ "tuningConfig": {
+ "type": "index_parallel"
+ }
+ }
+}
+```
+
+SQL-based ingestion sample query:
+```sql
+
+REPLACE INTO "bigdecimal" OVERWRITE ALL
+WITH "ext" AS (
+ SELECT *
+ FROM TABLE(
+ EXTERN(
+ '{"type":"local","baseDir":""/home/user/sales/data/staging/invoice-data","filter":"invoice-001.20201208.txt"}',
+ '{"type":"csv","findColumnsFromHeader":false,"columns":["timestamp","itemName","saleAmount"]}',
+ '[{"name":"timestamp","type":"string"},{"name":"itemName","type":"string"},{"name":"saleAmount","type":"double"}]'
+ )
+ )
+)
+SELECT
+ TIME_PARSE(TRIM("timestamp")) AS "__time",
+ "itemName",
+ BIG_SUM("saleAmount") as amount
+FROM "ext"
+group by TIME_PARSE(TRIM("timestamp")) , itemName
+PARTITIONED BY DAY
+```
+
+
+### Group By Query example
+
+Calculating sales groupBy all.
+
+Query syntax:
+
+```json
+{
+ "queryType": "groupBy",
+ "dataSource": "invoices",
+ "granularity": "ALL",
+ "dimensions": [
+ ],
+ "aggregations": [
+ {
+ "type": "compressedBigDecimalSum",
+ "name": "saleAmount",
+ "fieldName": "saleAmount",
+ "scale": 9,
+ "size": 3
+
+ }
+ ],
+ "intervals": [
+ "2020-01-08T00:00:00.000Z/P1D"
+ ]
+}
+```
+
+Result:
+
+```json
+[ {
+ "version" : "v1",
+ "timestamp" : "2020-12-08T00:00:00.000Z",
+ "event" : {
+ "revenue" : 15000000010.000000005
+ }
+} ]
+```
+
+Had you used *doubleSum* instead of *compressedBigDecimalSum* the result would be
+
+```json
+[ {
+ "timestamp" : "2020-12-08T00:00:00.000Z",
+ "result" : {
+ "revenue" : 1.500000001E10
+ }
+} ]
+```
+As shown above the precision is lost and could lead to loss in money.
+
+### TimeSeries Query Example
+
+Query syntax:
+
+```json
+{
+ "queryType": "timeseries",
+ "dataSource": "invoices",
+ "granularity": "ALL",
+ "aggregations": [
+ {
+ "type": "compressedBigDecimalSum",
+ "name": "revenue",
+ "fieldName": "revenue",
+ "scale": 9,
+ "size": 3
+ }
+ ],
+ "filter": {
+ "type": "not",
+ "field": {
+ "type": "selector",
+ "dimension": "itemName",
+ "value": "ItemD"
+ }
+ },
+ "intervals": [
+ "2020-12-08T00:00:00.000Z/P1D"
+ ]
+}
+```
+
+Result:
+
+```json
+[ {
+ "timestamp" : "2020-12-08T00:00:00.000Z",
+ "result" : {
+ "revenue" : 15000000010.000000005
+ }
+} ]
+```
+
+### Supported Query Functions
+
+Native aggregation functions:
+
+ * `compressedBigDecimalSum`
+ * `compressedBigDecimalMin`
+ * `compressedBigDecimalMax`
+
+SQL aggregation functions:
+ * `big_sum()`
+ * `big_min()`
+ * `big_max()`
+
diff --git a/docs/latest/development/extensions-contrib/consul.md b/docs/38.0.0/development/extensions-contrib/consul.md
similarity index 99%
copy from docs/latest/development/extensions-contrib/consul.md
copy to docs/38.0.0/development/extensions-contrib/consul.md
index 7b774f31b..9f42d9971 100644
--- a/docs/latest/development/extensions-contrib/consul.md
+++ b/docs/38.0.0/development/extensions-contrib/consul.md
@@ -22,7 +22,7 @@ title: "Consul-based Service Discovery"
~ under the License.
-->
-Apache Druid extension to enable using HashiCorp Consul for node discovery. This extension allows Druid clusters to use Consul's service catalog for discovering nodes, as an alternative to ZooKeeper or Kubernetes-based discovery.
+Apache® Druid extension to enable using HashiCorp Consul for node discovery. This extension allows Druid clusters to use Consul's service catalog for discovering nodes, as an alternative to ZooKeeper or discovery using Kubernetes®.
## Quick Start
diff --git a/docs/38.0.0/development/extensions-contrib/ddsketch-quantiles.md b/docs/38.0.0/development/extensions-contrib/ddsketch-quantiles.md
new file mode 100644
index 000000000..bd1a1e1da
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/ddsketch-quantiles.md
@@ -0,0 +1,139 @@
+---
+id: ddsketch-quantiles
+title: "DDSketches for Approximate Quantiles module"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+This module provides aggregators for approximate quantile queries using the [DDSketch](https://github.com/datadog/sketches-java) library. The DDSketch library provides a fast, and fully-mergeable quantile sketch with relative error. If the true quantile is 100, a sketch with relative error of 1% guarantees a quantile value between 101 and 99. This is important and highly valuable behavior for long tail distributions. The best use case for these sketches is for accurately describing the u [...]
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) in the extensions load list.
+
+```
+druid.extensions.loadList=["druid-ddsketch", ...]
+```
+
+### Aggregator
+
+The result of the aggregation is a DDSketch that is the union of all sketches either built from raw data or read from the segments. The single number that is returned represents the total number of included data points. The default aggregator type of `ddSketch` uses the collapsingLowestDense strategy for storing and merging sketch. This means that in favor of keeping the highest values represented at the highest accuracy, the sketch will collapse and merge lower, smaller values in the sk [...]
+
+The `ddSketch` aggregator operates over raw data and precomputed sketches.
+
+```json
+{
+ "type" : "ddSketch",
+ "name" : <output_name>,
+ "fieldName" : <input_name>,
+ "relativeError" : <double(0, 1)>,
+ "numBins": <int>
+ }
+```
+
+|property|description|required?|
+|--------|-----------|---------|
+|type|Must be "ddSketch" |yes|
+|name|A String for the output (result) name of the calculation.|yes|
+|fieldName|A String for the name of the input field (can contain sketches or raw numeric values).|yes|
+|relativeError|Describes the precision in which to store the sketch. Must be a number between 0 and 1.|no, defaults to 0.01 (1% error)|
+|numBins|Total number of bins the sketch is allowed to use to describe the distribution. This has a direct impact on max memory used. The more total bins available, the larger the range of accurate quantiles. With relative accuracy of 2%, only 275 bins are required to cover values between 1 millisecond and 1 minute. 800 bins are required to cover values between 1 nanosecond and 1 day.|no, defaults to 1000|
+
+
+### Post Aggregators
+
+To compute approximate quantiles, use `quantilesFromDDSketch` to query for a set of quantiles or `quantileFromDDSketch` to query for a single quantile. Call these post-aggregators on the sketches created by the `ddSketch` aggregators.
+
+
+#### quantilesFromDDSketch
+
+Use `quantilesFromDDSketch` to fetch multiple quantiles.
+
+```json
+{
+ "type" : "quantilesFromDDSketch",
+ "name" : <output_name>,
+ "field" : <reference to DDSketch>,
+ "fractions" : <array of doubles in [0,1]>
+}
+```
+
+|property|description|required?|
+|--------|-----------|---------|
+|type|Must be "quantilesFromDDSketch" |yes|
+|name|A String for the output (result) name of the calculation.|yes|
+|field|A computed ddSketch.|yes|
+|fractions|Array of doubles from 0 to 1 of the quantiles to compute|yes|
+
+#### quantileFromDDSketch
+
+Use `quantileFromDDSketch` to fetch a single quantile.
+
+```json
+{
+ "type" : "quantileFromDDSketch",
+ "name" : <output_name>,
+ "field" : <reference to DDsketch>,
+ "fraction" : <double [0,1]>
+}
+```
+
+|property|description|required?|
+|--------|-----------|---------|
+|type|Must be "quantileFromDDSketch" |yes|
+|name|A String for the output (result) name of the calculation.|yes|
+|field|A computed ddSketch.|yes|
+|fraction|A double from 0 to 1 of the quantile to compute|yes|
+
+
+### Example
+
+As an example of a query with sketches pre-aggregated at ingestion time, one could set up the following aggregator at ingest:
+
+```json
+{
+ "type": "ddSketch",
+ "name": "sketch",
+ "fieldName": "value",
+ "relativeError": 0.01,
+ "numBins": 1000,
+}
+```
+
+Compute quantiles from the pre-aggregated sketches using the following aggregator and post-aggregator.
+
+```json
+{
+ "aggregations": [{
+ "type": "ddSketch",
+ "name": "sketch",
+ "fieldName": "sketch",
+ }],
+ "postAggregations": [
+ {
+ "type": "quantilesFromDDSketch",
+ "name": "quantiles",
+ "fractions": [0.5, 0.75, 0.9, 0.99],
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": "sketch"
+ }
+ }]
+}
+```
diff --git a/docs/38.0.0/development/extensions-contrib/delta-lake.md b/docs/38.0.0/development/extensions-contrib/delta-lake.md
new file mode 100644
index 000000000..1d8cc8018
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/delta-lake.md
@@ -0,0 +1,52 @@
+---
+id: delta-lake
+title: "Delta Lake extension"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Delta Lake is an open source storage framework that enables building a
+Lakehouse architecture with various compute engines. [DeltaLakeInputSource](../../ingestion/input-sources.md#delta-lake-input-source) lets
+you ingest data stored in a Delta Lake table into Apache Druid. To use the Delta Lake extension, add the `druid-deltalake-extensions` to the list of loaded extensions.
+See [Loading extensions](../../configuration/extensions.md#loading-extensions) for more information.
+
+The Delta input source reads the configured Delta Lake table and extracts the underlying Delta files in the table's latest snapshot
+based on an optional Delta filter. These Delta Lake files are versioned Parquet files.
+
+## Version support
+
+The Delta Lake extension uses the Delta Kernel introduced in Delta Lake 3.0.0, which is compatible with Apache Spark 3.5.x.
+Older versions are unsupported, so consider upgrading to Delta Lake 3.0.x or higher to use this extension.
+
+## Downloading Delta Lake extension
+
+To download `druid-deltalake-extensions`, run the following command after replacing `<VERSION>` with the desired
+Druid version:
+
+```shell
+java \
+ -cp "lib/*" \
+ -Ddruid.extensions.directory="extensions" \
+ org.apache.druid.cli.Main tools pull-deps \
+ -c "org.apache.druid.extensions.contrib:druid-deltalake-extensions:<VERSION>"
+```
+
+See [Loading community extensions](../../configuration/extensions.md#loading-community-extensions) for more information.
\ No newline at end of file
diff --git a/docs/38.0.0/development/extensions-contrib/distinctcount.md b/docs/38.0.0/development/extensions-contrib/distinctcount.md
new file mode 100644
index 000000000..38f8e5efb
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/distinctcount.md
@@ -0,0 +1,99 @@
+---
+id: distinctcount
+title: "DistinctCount Aggregator"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) the `druid-distinctcount` in the extensions load list.
+
+Additionally, follow these steps:
+
+1. First, use a single dimension hash-based partition spec to partition data by a single dimension. For example visitor_id. This to make sure all rows with a particular value for that dimension will go into the same segment, or this might over count.
+2. Second, use distinctCount to calculate the distinct count, make sure queryGranularity is divided exactly by segmentGranularity or else the result will be wrong.
+
+There are some limitations, when used with groupBy, the groupBy keys' numbers should not exceed maxIntermediateRows in every segment. If exceeded the result will be wrong. When used with topN, numValuesPerPass should not be too big. If too big the distinctCount will use a lot of memory and might cause the JVM to go our of memory.
+
+Example:
+
+## Timeseries query
+
+```json
+{
+ "queryType": "timeseries",
+ "dataSource": "sample_datasource",
+ "granularity": "day",
+ "aggregations": [
+ {
+ "type": "distinctCount",
+ "name": "uv",
+ "fieldName": "visitor_id"
+ }
+ ],
+ "intervals": [
+ "2016-03-01T00:00:00.000/2013-03-20T00:00:00.000"
+ ]
+}
+```
+
+## TopN query
+
+```json
+{
+ "queryType": "topN",
+ "dataSource": "sample_datasource",
+ "dimension": "sample_dim",
+ "threshold": 5,
+ "metric": "uv",
+ "granularity": "all",
+ "aggregations": [
+ {
+ "type": "distinctCount",
+ "name": "uv",
+ "fieldName": "visitor_id"
+ }
+ ],
+ "intervals": [
+ "2016-03-06T00:00:00/2016-03-06T23:59:59"
+ ]
+}
+```
+
+## GroupBy query
+
+```json
+{
+ "queryType": "groupBy",
+ "dataSource": "sample_datasource",
+ "dimensions": ["sample_dim"],
+ "granularity": "all",
+ "aggregations": [
+ {
+ "type": "distinctCount",
+ "name": "uv",
+ "fieldName": "visitor_id"
+ }
+ ],
+ "intervals": [
+ "2016-03-06T00:00:00/2016-03-06T23:59:59"
+ ]
+}
+```
diff --git a/docs/38.0.0/development/extensions-contrib/druid-exact-count-bitmap.md b/docs/38.0.0/development/extensions-contrib/druid-exact-count-bitmap.md
new file mode 100644
index 000000000..b39ed38dd
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/druid-exact-count-bitmap.md
@@ -0,0 +1,452 @@
+---
+id: druid-exact-count-bitmap
+title: "Exact Count Bitmap"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+This extension provides exact cardinality counting functionality for LONG type columns using [Roaring Bitmaps](https://roaringbitmap.org/). Unlike approximate cardinality aggregators like HyperLogLog, this aggregator provides precise distinct counts.
+
+## Installation
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-exact-count-bitmap` in the extensions load list.
+
+## Comparison with Similar Aggregations
+
+The [Distinct Count Aggregator](https://druid.apache.org/docs/latest/development/extensions-contrib/distinctcount/) works in a similar way to the Exact Count Aggregator. Hence, it is important to understand the difference between the behavior of these two aggregators.
+
+| Exact Count | Distinct Count |
+| -- | -- |
+| No prerequisites needed (e.g. configuring hash partition, segment granularity) | Prerequisites needed to perform aggregation |
+| Works on 64-bit number columns only (BIGINT) | Works on dimension columns (Including Strings, Complex Types, etc) |
+
+## How it Works
+
+The extension uses `Roaring64NavigableMap` as its underlying data structure to efficiently store and compute exact cardinality of 64-bit integers. It provides two types of aggregators that serve different purposes:
+
+### Build Aggregator (Bitmap64ExactCountBuild)
+
+The BUILD aggregator is used when you want to compute cardinality directly from raw LONG values:
+
+- Used during ingestion or when querying raw data
+- Must be used on columns of type LONG.
+
+Example:
+
+```json
+{
+ "type": "Bitmap64ExactCountBuild",
+ "name": "unique_values",
+ "fieldName": "id"
+}
+```
+
+### Merge Aggregator (Bitmap64ExactCountMerge)
+
+The MERGE aggregator is used when working with pre-computed bitmaps:
+
+- Used for querying pre-aggregated data (columns that were previously aggregated using BUILD)
+- Combines multiple bitmaps using bitwise operations.
+- Must be used on columns that are aggregated using BUILD, or by a previous MERGE.
+- `Bitmap64ExactCountMerge` aggregator is recommended for use in `timeseries` type queries, though it also works for `topN` and `groupBy` queries.
+
+Example:
+
+```json
+{
+ "type": "Bitmap64ExactCountMerge",
+ "name": "total_unique_values",
+ "fieldName": "unique_values" // Must be a pre-computed bitmap
+}
+```
+
+### Typical Workflow
+
+1. During ingestion, use BUILD to create the initial bitmap:
+ ```json
+ {
+ "type": "index",
+ "spec": {
+ "dataSchema": {
+ "metricsSpec": [
+ {
+ "type": "Bitmap64ExactCountBuild",
+ "name": "unique_users",
+ "fieldName": "user_id"
+ }
+ ]
+ }
+ }
+ }
+ ```
+
+2. When querying the aggregated data, use MERGE to combine bitmaps:
+ ```json
+ {
+ "queryType": "timeseries",
+ "aggregations": [
+ {
+ "type": "Bitmap64ExactCountMerge",
+ "name": "total_unique_users",
+ "fieldName": "unique_users"
+ }
+ ]
+ }
+ ```
+
+## Usage
+
+### SQL Query
+
+You can use the `BITMAP64_EXACT_COUNT` function in SQL queries:
+
+```sql
+SELECT BITMAP64_EXACT_COUNT(column_name)
+FROM datasource
+WHERE ...
+GROUP BY ...
+```
+
+### Post-Aggregator
+
+You can also use the post-aggregator for further processing:
+
+```json
+{
+ "type": "bitmap64ExactCount",
+ "name": "<output_name>",
+ "fieldName": "<aggregator_name>"
+}
+```
+
+## Considerations
+
+- **Memory Usage**: While Roaring Bitmaps are efficient, storing exact unique values will generally consume more memory than approximate algorithms like HyperLogLog.
+- **Input Type**: This aggregator only works with LONG (64-bit integer) columns. String or other data types must be converted to longs before using this aggregator.
+- **Build vs Merge**: Always use BUILD for raw numeric data and MERGE for pre-aggregated data. Using BUILD on pre-aggregated data or MERGE on raw data will not work correctly.
+
+## Example Use Cases
+
+1. **User Analytics**: Count unique users over time
+
+```sql
+-- First ingest with BUILD aggregator
+-- Then query with:
+SELECT
+ TIME_FLOOR(__time, 'PT1H') AS hour,
+ BITMAP64_EXACT_COUNT(unique_users) as distinct_users
+FROM user_metrics
+GROUP BY 1
+```
+
+2. **High-Precision Metrics**: When exact counts are required
+
+```json
+{
+ "type": "groupBy",
+ "dimensions": [
+ "country"
+ ],
+ "aggregations": [
+ {
+ "type": "Bitmap64ExactCountMerge",
+ "name": "exact_user_count",
+ "fieldName": "unique_users"
+ }
+ ]
+}
+```
+
+## Walkthrough Using Wikipedia datasource
+
+### Batch Ingestion Task Spec
+
+```json
+{
+ "type": "index",
+ "spec": {
+ "dataSchema": {
+ "dataSource": "wikipedia_metrics",
+ "timestampSpec": {
+ "column": "__time",
+ "format": "auto"
+ },
+ "dimensionsSpec": {
+ "dimensions": [
+ "channel",
+ "namespace",
+ "page",
+ "user",
+ "cityName",
+ "countryName",
+ "regionName",
+ "isRobot",
+ "isUnpatrolled",
+ "isNew",
+ "isAnonymous"
+ ]
+ },
+ "metricsSpec": [
+ {
+ "type": "Bitmap64ExactCountBuild",
+ "name": "unique_added_values",
+ "fieldName": "added"
+ },
+ {
+ "type": "Bitmap64ExactCountBuild",
+ "name": "unique_delta_values",
+ "fieldName": "delta"
+ },
+ {
+ "type": "Bitmap64ExactCountBuild",
+ "name": "unique_comment_lengths",
+ "fieldName": "commentLength"
+ },
+ {
+ "name": "count",
+ "type": "count"
+ },
+ {
+ "name": "sum_added",
+ "type": "longSum",
+ "fieldName": "added"
+ },
+ {
+ "name": "sum_delta",
+ "type": "longSum",
+ "fieldName": "delta"
+ }
+ ],
+ "granularitySpec": {
+ "type": "uniform",
+ "segmentGranularity": "DAY",
+ "queryGranularity": "HOUR",
+ "rollup": true,
+ "intervals": [
+ "2016-06-27/2016-06-28"
+ ]
+ }
+ },
+ "ioConfig": {
+ "type": "index",
+ "inputSource": {
+ "type": "druid",
+ "dataSource": "wikipedia",
+ "interval": "2016-06-27/2016-06-28"
+ },
+ "inputFormat": {
+ "type": "tsv",
+ "findColumnsFromHeader": true
+ }
+ },
+ "tuningConfig": {
+ "type": "index",
+ "maxRowsPerSegment": 5000000,
+ "maxRowsInMemory": 25000
+ }
+ }
+}
+```
+
+### Query from datasource with raw bytes
+
+```json
+{
+ "queryType": "timeseries",
+ "dataSource": {
+ "type": "table",
+ "name": "wikipedia_metrics"
+ },
+ "intervals": {
+ "type": "intervals",
+ "intervals": [
+ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
+ ]
+ },
+ "granularity": {
+ "type": "all"
+ },
+ "aggregations": [
+ {
+ "type": "Bitmap64ExactCountBuild",
+ "name": "a0",
+ "fieldName": "unique_added_values"
+ }
+ ]
+}
+```
+
+### Query from datasource with pre-aggregated bitmap
+
+```json
+{
+ "queryType": "timeseries",
+ "dataSource": {
+ "type": "table",
+ "name": "wikipedia_metrics"
+ },
+ "intervals": {
+ "type": "intervals",
+ "intervals": [
+ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
+ ]
+ },
+ "granularity": {
+ "type": "all"
+ },
+ "aggregations": [
+ {
+ "type": "Bitmap64ExactCountMerge",
+ "name": "a0",
+ "fieldName": "unique_added_values"
+ }
+ ]
+}
+```
+
+## Other Examples
+
+### Kafka ingestion task spec
+
+```json
+{
+ "type": "kafka",
+ "spec": {
+ "dataSchema": {
+ "dataSource": "ticker_event_bitmap64_exact_count_rollup",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "millis",
+ "missingValue": null
+ },
+ "dimensionsSpec": {
+ "dimensions": [
+ {
+ "type": "string",
+ "name": "key"
+ }
+ ],
+ "dimensionExclusions": []
+ },
+ "metricsSpec": [
+ {
+ "type": "Bitmap64ExactCountBuild",
+ "name": "count",
+ "fieldName": "value"
+ }
+ ],
+ "granularitySpec": {
+ "type": "uniform",
+ "segmentGranularity": "HOUR",
+ "queryGranularity": "HOUR",
+ "rollup": true,
+ "intervals": null
+ },
+ "transformSpec": {
+ "filter": null,
+ "transforms": []
+ }
+ },
+ "ioConfig": {
+ "topic": "ticker_event",
+ "inputFormat": {
+ "type": "json",
+ "flattenSpec": {
+ "useFieldDiscovery": true,
+ "fields": []
+ },
+ "featureSpec": {}
+ },
+ "replicas": 1,
+ "taskCount": 1,
+ "taskDuration": "PT3600S",
+ "consumerProperties": {
+ "bootstrap.servers": "localhost:9092"
+ },
+ "pollTimeout": 100,
+ "startDelay": "PT5S",
+ "period": "PT30S",
+ "useEarliestOffset": false,
+ "completionTimeout": "PT1800S",
+ "lateMessageRejectionPeriod": null,
+ "earlyMessageRejectionPeriod": null,
+ "lateMessageRejectionStartDateTime": null,
+ "stream": "ticker_event",
+ "useEarliestSequenceNumber": false,
+ "type": "kafka"
+ }
+ }
+}
+```
+
+### Query with Post-aggregator:
+
+```json
+{
+ "queryType": "timeseries",
+ "dataSource": {
+ "type": "table",
+ "name": "ticker_event_bitmap64_exact_count_rollup"
+ },
+ "intervals": {
+ "type": "intervals",
+ "intervals": [
+ "2020-09-13T06:35:35.000Z/146140482-04-24T15:36:27.903Z"
+ ]
+ },
+ "descending": false,
+ "virtualColumns": [],
+ "filter": null,
+ "granularity": {
+ "type": "all"
+ },
+ "aggregations": [
+ {
+ "type": "count",
+ "name": "cnt"
+ },
+ {
+ "type": "Bitmap64ExactCountMerge",
+ "name": "a0",
+ "fieldName": "count"
+ }
+ ],
+ "postAggregations": [
+ {
+ "type": "arithmetic",
+ "fn": "/",
+ "fields": [
+ {
+ "type": "bitmap64ExactCount",
+ "name": "a0",
+ "fieldName": "a0"
+ },
+ {
+ "type": "fieldAccess",
+ "name": "cnt",
+ "fieldName": "cnt"
+ }
+ ],
+ "name": "rollup_rate"
+ }
+ ],
+ "limit": 2147483647
+}
+```
diff --git a/docs/latest/development/extensions-contrib/druid-ranger-security.md b/docs/38.0.0/development/extensions-contrib/druid-ranger-security.md
similarity index 96%
copy from docs/latest/development/extensions-contrib/druid-ranger-security.md
copy to docs/38.0.0/development/extensions-contrib/druid-ranger-security.md
index 6d321e50a..824fcbeb5 100644
--- a/docs/latest/development/extensions-contrib/druid-ranger-security.md
+++ b/docs/38.0.0/development/extensions-contrib/druid-ranger-security.md
@@ -22,7 +22,7 @@ title: "Apache Ranger Security"
~ under the License.
-->
-This Apache Druid extension adds an Authorizer which implements access control for Druid, backed by [Apache Ranger](https://ranger.apache.org/). Please see [Authentication and Authorization](../../operations/auth.md) for more information on the basic facilities this extension provides.
+This Apache® Druid extension adds an Authorizer which implements access control for Druid using [Apache® Ranger](https://ranger.apache.org/). See [Authentication and authorization](../../operations/auth.md) for more information.
Make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-ranger-security` in the extensions load list.
diff --git a/docs/38.0.0/development/extensions-contrib/gce-extensions.md b/docs/38.0.0/development/extensions-contrib/gce-extensions.md
new file mode 100644
index 000000000..2a8da6615
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/gce-extensions.md
@@ -0,0 +1,103 @@
+---
+id: gce-extensions
+title: "GCE Extensions"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `gce-extensions` in the extensions load list.
+
+At the moment, this extension enables only Druid to autoscale instances in GCE.
+
+The extension manages the instances to be scaled up and down through the use of the [Managed Instance Groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#resize_managed_group)
+of GCE (MIG from now on). This choice has been made to ease the configuration of the machines and simplify their
+management.
+
+For this reason, in order to use this extension, the user must have created
+1. An instance template with the right machine type and image to bu used to run the Middle Manager
+2. A MIG that has been configured to use the instance template created in the point above
+
+Moreover, in order to be able to rescale the machines in the MIG, the Overlord must run with a service account
+guaranteeing the following two scopes from the [Compute Engine API](https://developers.google.com/identity/protocols/googlescopes#computev1)
+- `https://www.googleapis.com/auth/cloud-platform`
+- `https://www.googleapis.com/auth/compute`
+
+## Overlord Dynamic Configuration
+
+The Overlord can dynamically change worker behavior.
+
+The JSON object can be submitted to the Overlord via a POST request at:
+
+```
+http://<OVERLORD_IP>:<port>/druid/indexer/v1/worker
+```
+
+Optional Header Parameters for auditing the config change can also be specified.
+
+|Header Param Name| Description | Default |
+|----------|-------------|---------|
+|`X-Druid-Author`| author making the config change|""|
+|`X-Druid-Comment`| comment describing the change being done|""|
+
+A sample worker config spec is shown below:
+
+```json
+{
+ "autoScaler": {
+ "envConfig" : {
+ "numInstances" : 1,
+ "projectId" : "super-project",
+ "zoneName" : "us-central-1",
+ "managedInstanceGroupName" : "druid-middlemanagers"
+ },
+ "maxNumWorkers" : 4,
+ "minNumWorkers" : 2,
+ "type" : "gce"
+ }
+}
+```
+
+The configuration of the autoscaler is quite simple and it is made of two levels only.
+
+The external level specifies the `type`—always `gce` in this case— and two numeric values,
+the `maxNumWorkers` and `minNumWorkers` used to define the boundaries in between which the
+number of instances must be at any time.
+
+The internal level is the `envConfig` and it is used to specify
+
+- The `numInstances` used to specify how many workers will be spawned at each
+request to provision more workers. This is safe to be left to `1`
+- The `projectId` used to specify the name of the project in which the MIG resides
+- The `zoneName` used to identify in which zone of the worlds the MIG is
+- The `managedInstanceGroupName` used to specify the MIG containing the instances created or
+removed
+
+Please refer to the Overlord Dynamic Configuration section in the main [documentation](../../configuration/index.md)
+for parameters other than the ones specified here, such as `selectStrategy` etc.
+
+## Known limitations
+
+- The module internally uses the [ListManagedInstances](https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers/listManagedInstances)
+ call from the API and, while the documentation of the API states that the call can be paged through using the
+ `pageToken` argument, the responses to such call do not provide any `nextPageToken` to set such parameter. This means
+ that the extension can operate safely with a maximum of 500 Middle Managers instances at any time (the maximum number
+ of instances to be returned for each call).
+
\ No newline at end of file
diff --git a/docs/38.0.0/development/extensions-contrib/graphite.md b/docs/38.0.0/development/extensions-contrib/graphite.md
new file mode 100644
index 000000000..a6e04e9b0
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/graphite.md
@@ -0,0 +1,117 @@
+---
+id: graphite
+title: "Graphite Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `graphite-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits druid metrics to a graphite carbon server.
+Metrics can be sent by using [plaintext](http://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-plaintext-protocol) or [pickle](http://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-pickle-protocol) protocol.
+The pickle protocol is more efficient and supports sending batches of metrics (plaintext protocol send only one metric) in one request; batch size is configurable.
+
+## Configuration
+
+All the configuration parameters for graphite emitter are under `druid.emitter.graphite`.
+
+|property|description|required?|default|
+|--------|-----------|---------|-------|
+|`druid.emitter.graphite.hostname`|The hostname of the graphite server.|yes|none|
+|`druid.emitter.graphite.port`|The port of the graphite server.|yes|none|
+|`druid.emitter.graphite.batchSize`|Number of events to send as one batch (only for pickle protocol)|no|100|
+|`druid.emitter.graphite.protocol`|Graphite protocol; available protocols: pickle, plaintext.|no|pickle|
+|`druid.emitter.graphite.eventConverter`| Filter and converter of druid events to graphite event (please see next section).|yes|none|
+|`druid.emitter.graphite.flushPeriod` | Queue flushing period in milliseconds. |no|1 minute|
+|`druid.emitter.graphite.maxQueueSize`| Maximum size of the queue used to buffer events. |no|`MAX_INT`|
+|`druid.emitter.graphite.alertEmitters`| List of emitters where alerts will be forwarded to. This is a JSON list of emitter names, e.g. `["logging", "http"]`|no| empty list (no forwarding)|
+|`druid.emitter.graphite.requestLogEmitters`| List of emitters where request logs (i.e., query logging events sent to emitters when `druid.request.logging.type` is set to `emitter`) will be forwarded to. This is a JSON list of emitter names, e.g. `["logging", "http"]`|no| empty list (no forwarding)|
+|`druid.emitter.graphite.emitWaitTime` | wait time in milliseconds to try to send the event otherwise emitter will throwing event. |no|0|
+|`druid.emitter.graphite.waitForEventTime` | waiting time in milliseconds if necessary for an event to become available. |no|1000 (1 sec)|
+
+### Supported event types
+
+The graphite emitter only emits service metric events to graphite (See [Druid Metrics](../../operations/metrics.md) for a list of metrics).
+
+Alerts and request logs are not sent to graphite. These event types are not well represented in Graphite, which is more suited for timeseries views on numeric metrics, vs. storing non-numeric log events.
+
+Instead, alerts and request logs are optionally forwarded to other emitter implementations, specified by `druid.emitter.graphite.alertEmitters` and `druid.emitter.graphite.requestLogEmitters` respectively.
+
+### Druid to Graphite Event Converter
+
+Graphite Event Converter defines a mapping between druid metrics name plus dimensions to a Graphite metric path.
+Graphite metric path is organized using the following schema:
+`<namespacePrefix>.[<druid service name>].[<druid hostname>].<druid metrics dimensions>.<druid metrics name>`
+Properly naming the metrics is critical to avoid conflicts, confusing data and potentially wrong interpretation later on.
+
+Example `druid.historical.hist-host1_yahoo_com:8080.MyDataSourceName.GroupBy.query/time`:
+
+ * `druid` -> namespace prefix
+ * `historical` -> service name
+ * `hist-host1.yahoo.com:8080` -> druid hostname
+ * `MyDataSourceName` -> dimension value
+ * `GroupBy` -> dimension value
+ * `query/time` -> metric name
+
+We have two different implementation of event converter:
+
+#### Send-All converter
+
+The first implementation called `all`, will send all the druid service metrics events.
+The path will be in the form `<namespacePrefix>.[<druid service name>].[<druid hostname>].<dimensions values ordered by dimension's name>.<metric>`
+User has control of `<namespacePrefix>.[<druid service name>].[<druid hostname>].`
+
+You can omit the hostname by setting `ignoreHostname=true`
+`druid.SERVICE_NAME.dataSourceName.queryType.query/time`
+
+You can omit the service name by setting `ignoreServiceName=true`
+`druid.HOSTNAME.dataSourceName.queryType.query/time`
+
+Elements in metric name by default are separated by "/", so graphite will create all metrics on one level. If you want to have metrics in the tree structure, you have to set `replaceSlashWithDot=true`
+Original: `druid.HOSTNAME.dataSourceName.queryType.query/time`
+Changed: `druid.HOSTNAME.dataSourceName.queryType.query.time`
+
+
+```json
+
+druid.emitter.graphite.eventConverter={"type":"all", "namespacePrefix": "druid.test", "ignoreHostname":true, "ignoreServiceName":true}
+
+```
+
+#### White-list based converter
+
+The second implementation called `whiteList`, will send only the white listed metrics and dimensions.
+Same as for the `all` converter user has control of `<namespacePrefix>.[<druid service name>].[<druid hostname>].`
+White-list based converter comes with the following default white list map located under resources in `./src/main/resources/defaultWhiteListMap.json`
+
+Although user can override the default white list map by supplying a property called `mapPath`.
+This property is a String containing the path for the file containing **white list map JSON object**.
+For example the following converter will read the map from the file `/pathPrefix/fileName.json`.
+
+```json
+
+druid.emitter.graphite.eventConverter={"type":"whiteList", "namespacePrefix": "druid.test", "ignoreHostname":true, "ignoreServiceName":true, "mapPath":"/pathPrefix/fileName.json"}
+
+```
+
+**Druid emits a huge number of metrics we highly recommend to use the `whiteList` converter**
diff --git a/docs/latest/development/extensions-contrib/iceberg.md b/docs/38.0.0/development/extensions-contrib/iceberg.md
similarity index 95%
copy from docs/latest/development/extensions-contrib/iceberg.md
copy to docs/38.0.0/development/extensions-contrib/iceberg.md
index bbb98101e..7373d0fad 100644
--- a/docs/latest/development/extensions-contrib/iceberg.md
+++ b/docs/38.0.0/development/extensions-contrib/iceberg.md
@@ -27,7 +27,7 @@ to Apache Iceberg docs: https://github.com/apache/iceberg/blob/main/docs/mkdocs.
## Iceberg Ingest extension
-Apache Iceberg is an open table format for huge analytic datasets. [IcebergInputSource](../../ingestion/input-sources.md#iceberg-input-source) lets you ingest data stored in the Iceberg table format into Apache Druid. To use the iceberg extension, add the `druid-iceberg-extensions` to the list of loaded extensions. See [Loading extensions](../../configuration/extensions.md#loading-extensions) for more information.
+Apache® Iceberg is an open table format for large analytic datasets. [IcebergInputSource](../../ingestion/input-sources.md#iceberg-input-source) lets you ingest data stored in the Iceberg table format into Apache Druid. To use the Iceberg extension, add the `druid-iceberg-extensions` to the list of loaded extensions. See [Loading extensions](../../configuration/extensions.md#loading-extensions) for more information.
Iceberg manages most of its metadata in metadata files in the object storage. However, it is still dependent on a metastore to manage a certain amount of metadata.
Iceberg refers to these metastores as catalogs. The Iceberg extension lets you connect to the following Iceberg catalog types:
diff --git a/docs/38.0.0/development/extensions-contrib/influx.md b/docs/38.0.0/development/extensions-contrib/influx.md
new file mode 100644
index 000000000..4286d187f
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/influx.md
@@ -0,0 +1,68 @@
+---
+id: influx
+title: "InfluxDB Line Protocol Input Format"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-influx-extensions` in the extensions load list.
+
+This extension enables Druid to parse the [InfluxDB Line Protocol](https://docs.influxdata.com/influxdb/v1.5/write_protocols/line_protocol_tutorial/), a popular text-based timeseries metric serialization format.
+
+## Line Protocol
+
+A typical line looks like this:
+
+```cpu,application=dbhost=prdb123,region=us-east-1 usage_idle=99.24,usage_user=0.55 1520722030000000000```
+
+which contains four parts:
+
+ - measurement: A string indicating the name of the measurement represented (e.g. cpu, network, web_requests)
+ - tags: zero or more key-value pairs (i.e. dimensions)
+ - measurements: one or more key-value pairs; values can be numeric, boolean, or string
+ - timestamp: nanoseconds since Unix epoch (the reader truncates it to milliseconds)
+
+The input format extracts these fields into a map, giving the measurement the key `measurement` and the timestamp the key `__ts`. The tag and measurement keys are copied verbatim, so users should take care to avoid name collisions. It is up to the ingestion spec to decide which fields should be treated as dimensions and which should be treated as metrics (typically tags correspond to dimensions and measurements correspond to metrics).
+
+The input format is configured like so:
+
+```json
+"inputFormat": {
+ "type": "influx",
+ "whitelistMeasurements": [
+ "cpu"
+ ]
+}
+```
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|`type`|String|Must be `influx`.|yes|
+|`whitelistMeasurements`|List of String|If present, measurements that do not match one of the strings in the list will be ignored.|no|
+
+When using the `influx` input format, the timestamp spec should be configured with column `__ts` and format `millis`:
+
+```json
+"timestampSpec": {
+ "column": "__ts",
+ "format": "millis"
+}
+```
\ No newline at end of file
diff --git a/docs/38.0.0/development/extensions-contrib/influxdb-emitter.md b/docs/38.0.0/development/extensions-contrib/influxdb-emitter.md
new file mode 100644
index 000000000..1086a5121
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/influxdb-emitter.md
@@ -0,0 +1,78 @@
+---
+id: influxdb-emitter
+title: "InfluxDB Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-influxdb-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits druid metrics to [InfluxDB](https://www.influxdata.com/time-series-platform/influxdb/) over HTTP. Currently this emitter only emits service metric events to InfluxDB (See [Druid metrics](../../operations/metrics.md) for a list of metrics).
+When a metric event is fired it is added to a queue of events. After a configurable amount of time, the events on the queue are transformed to InfluxDB's line protocol
+and POSTed to the InfluxDB HTTP API. The entire queue is flushed at this point. The queue is also flushed as the emitter is shutdown.
+
+Note that authentication and authorization must be [enabled](https://docs.influxdata.com/influxdb/v1.7/administration/authentication_and_authorization/) on the InfluxDB server.
+
+## Configuration
+
+All the configuration parameters for the influxdb emitter are under `druid.emitter.influxdb`.
+
+|Property|Description|Required?|Default|
+|--------|-----------|---------|-------|
+|`druid.emitter.influxdb.hostname`|The hostname of the InfluxDB server.|Yes|N/A|
+|`druid.emitter.influxdb.port`|The port of the InfluxDB server.|No|8086|
+|`druid.emitter.influxdb.protocol`|The protocol used to send metrics to InfluxDB. One of http/https|No|http|
+|`druid.emitter.influxdb.trustStorePath`|The path to the trustStore to be used for https|No|none|
+|`druid.emitter.influxdb.trustStoreType`|The trustStore type to be used for https|No|`jks`|
+|`druid.emitter.influxdb.trustStorePassword`|The trustStore password to be used for https|No|none|
+|`druid.emitter.influxdb.databaseName`|The name of the database in InfluxDB.|Yes|N/A|
+|`druid.emitter.influxdb.maxQueueSize`|The size of the queue that holds events.|No|Integer.MAX_VALUE(=2^31-1)|
+|`druid.emitter.influxdb.flushPeriod`|How often (in milliseconds) the events queue is parsed into Line Protocol and POSTed to InfluxDB.|No|60000|
+|`druid.emitter.influxdb.flushDelay`|How long (in milliseconds) the scheduled method will wait until it first runs.|No|60000|
+|`druid.emitter.influxdb.influxdbUserName`|The username for authenticating with the InfluxDB database.|Yes|N/A|
+|`druid.emitter.influxdb.influxdbPassword`|The password of the database authorized user|Yes|N/A|
+|`druid.emitter.influxdb.dimensionWhitelist`|A whitelist of metric dimensions to include as tags|No|`["dataSource","type","numMetrics","numDimensions","threshold","dimension","taskType","taskStatus","tier"]`|
+
+## InfluxDB Line Protocol
+
+An example of how this emitter parses a Druid metric event into InfluxDB's [line protocol](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_reference/) is given here:
+
+The syntax of the line protocol is :
+
+`<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]`
+
+where timestamp is in nanoseconds since epoch.
+
+A typical service metric event as recorded by Druid's logging emitter is: `Event [{"feed":"metrics","timestamp":"2017-10-31T09:09:06.857Z","service":"druid/historical","host":"historical001:8083","version":"0.11.0-SNAPSHOT","metric":"query/cache/total/hits","value":34787256}]`.
+
+This event is parsed into line protocol according to these rules:
+
+* The measurement becomes druid_query since query is the first part of the metric.
+* The tags are service=druid/historical, hostname=historical001, metric=druid_cache_total. (The metric tag is the middle part of the druid metric separated with _ and preceded by druid_. Another example would be if an event has metric=query/time then there is no middle part and hence no metric tag)
+* The field is druid_hits since this is the last part of the metric.
+
+This gives the following String which can be POSTed to InfluxDB: `"druid_query,service=druid/historical,hostname=historical001,metric=druid_cache_total druid_hits=34787256 1509440946857000000"`
+
+The InfluxDB emitter has a white list of dimensions
+which will be added as a tag to the line protocol string if the metric has a dimension from the white list.
+The value of the dimension is sanitized such that every occurrence of a dot or whitespace is replaced with a `_` .
diff --git a/docs/38.0.0/development/extensions-contrib/kafka-emitter.md b/docs/38.0.0/development/extensions-contrib/kafka-emitter.md
new file mode 100644
index 000000000..772c0ff40
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/kafka-emitter.md
@@ -0,0 +1,66 @@
+---
+id: kafka-emitter
+title: "Kafka Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `kafka-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits Druid metrics to [Apache Kafka](https://kafka.apache.org) directly with JSON format.<br />
+Currently, Kafka has not only their nice ecosystem but also consumer API readily available.
+So, If you currently use Kafka, It's easy to integrate various tool or UI
+to monitor the status of your Druid cluster with this extension.
+
+## Configuration
+
+All the configuration parameters for the Kafka emitter are under `druid.emitter.kafka`.
+
+| Property | Description | Required | Default |
+|----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------|
+| `druid.emitter.kafka.bootstrap.servers` | Comma-separated Kafka broker. (`[hostname:port],[hostname:port]...`) | yes | none |
+| `druid.emitter.kafka.event.types` | Comma-separated event types. <br/>Supported types are `alerts`, `metrics`, `requests`, and `segment_metadata`. | no | `["metrics", "alerts"]` |
+| `druid.emitter.kafka.metric.topic` | Kafka topic name for emitter's target to emit service metrics. If `event.types` contains `metrics`, this field cannot be empty. | no | none |
+| `druid.emitter.kafka.alert.topic` | Kafka topic name for emitter's target to emit alerts. If `event.types` contains `alerts`, this field cannot empty. | no | none |
+| `druid.emitter.kafka.request.topic` | Kafka topic name for emitter's target to emit request logs. If `event.types` contains `requests`, this field cannot be empty. | no | none |
+| `druid.emitter.kafka.segmentMetadata.topic` | Kafka topic name for emitter's target to emit segment metadata. If `event.types` contains `segment_metadata`, this field cannot be empty. | no | none |
+| `druid.emitter.kafka.producer.config` | JSON configuration to set additional properties to Kafka producer. | no | none |
+| `druid.emitter.kafka.clusterName` | Optional value to specify the name of your Druid cluster. It can help make groups in your monitoring environment. | no | none |
+| `druid.emitter.kafka.extra.dimensions` | Optional JSON configuration to specify a map of extra string dimensions for the events emitted. These can help make groups in your monitoring environment. | no | none |
+| `druid.emitter.kafka.producer.hiddenProperties` | JSON configuration to specify sensitive Kafka producer properties such as username and password. This property accepts a [DynamicConfigProvider](../../operations/dynamic-config-provider.md) implementation. | no | none |
+| `druid.emitter.kafka.producer.shutdownTimeout` | Duration in milliseconds the Kafka producer waits for pending requests to finish before shutting down. | no | Long.MAX_VALUE |
+
+### Example
+
+```
+druid.emitter.kafka.bootstrap.servers=hostname1:9092,hostname2:9092
+druid.emitter.kafka.event.types=["metrics", "alerts", "requests", "segment_metadata"]
+druid.emitter.kafka.metric.topic=druid-metric
+druid.emitter.kafka.alert.topic=druid-alert
+druid.emitter.kafka.request.topic=druid-request-logs
+druid.emitter.kafka.segmentMetadata.topic=druid-segment-metadata
+druid.emitter.kafka.producer.config={"max.block.ms":10000}
+druid.emitter.kafka.extra.dimensions={"region":"us-east-1","environment":"preProd"}
+druid.emitter.kafka.producer.hiddenProperties={"config":{"sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\\"KV...NI\\" password=\\"gA3...n6a/\\";"}}
+```
+
diff --git a/docs/38.0.0/development/extensions-contrib/momentsketch-quantiles.md b/docs/38.0.0/development/extensions-contrib/momentsketch-quantiles.md
new file mode 100644
index 000000000..eaad48f69
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/momentsketch-quantiles.md
@@ -0,0 +1,121 @@
+---
+id: momentsketch-quantiles
+title: "Moment Sketches for Approximate Quantiles module"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+This module provides aggregators for approximate quantile queries using the [momentsketch](https://github.com/stanford-futuredata/momentsketch) library.
+The momentsketch provides coarse quantile estimates with less space and aggregation time overheads than traditional sketches, approaching the performance of counts and sums by reconstructing distributions from computed statistics.
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) in the extensions load list.
+
+### Aggregator
+
+The result of the aggregation is a momentsketch that is the union of all sketches either built from raw data or read from the segments.
+
+The `momentSketch` aggregator operates over raw data while the `momentSketchMerge` aggregator should be used when aggregating precomputed sketches.
+
+```json
+{
+ "type" : <aggregator_type>,
+ "name" : <output_name>,
+ "fieldName" : <input_name>,
+ "k" : <int>,
+ "compress" : <boolean>
+ }
+```
+
+|property|description|required?|
+|--------|-----------|---------|
+|type|Type of aggregator desired. Either "momentSketch" or "momentSketchMerge" |yes|
+|name|A String for the output (result) name of the calculation.|yes|
+|fieldName|A String for the name of the input field (can contain sketches or raw numeric values).|yes|
+|k|Parameter that determines the accuracy and size of the sketch. Higher k means higher accuracy but more space to store sketches. Usable range is generally [3,15] |no, defaults to 13.|
+|compress|Flag for whether the aggregator compresses numeric values using arcsinh. Can improve robustness to skewed and long-tailed distributions, but reduces accuracy slightly on more uniform distributions.| no, defaults to true
+
+### Post Aggregators
+
+Users can query for a set of quantiles using the `momentSketchSolveQuantiles` post-aggregator on the sketches created by the `momentSketch` or `momentSketchMerge` aggregators.
+
+```json
+{
+ "type" : "momentSketchSolveQuantiles",
+ "name" : <output_name>,
+ "field" : <reference to moment sketch>,
+ "fractions" : <array of doubles in [0,1]>
+}
+```
+
+Users can also query for the min/max of a distribution:
+
+```json
+{
+ "type" : "momentSketchMin" | "momentSketchMax",
+ "name" : <output_name>,
+ "field" : <reference to moment sketch>,
+}
+```
+
+### Example
+As an example of a query with sketches pre-aggregated at ingestion time, one could set up the following aggregator at ingest:
+
+```json
+{
+ "type": "momentSketch",
+ "name": "sketch",
+ "fieldName": "value",
+ "k": 10,
+ "compress": true,
+}
+```
+
+and make queries using the following aggregator + post-aggregator:
+
+```json
+{
+ "aggregations": [{
+ "type": "momentSketchMerge",
+ "name": "sketch",
+ "fieldName": "sketch",
+ "k": 10,
+ "compress": true
+ }],
+ "postAggregations": [
+ {
+ "type": "momentSketchSolveQuantiles",
+ "name": "quantiles",
+ "fractions": [0.1, 0.5, 0.9],
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": "sketch"
+ }
+ },
+ {
+ "type": "momentSketchMin",
+ "name": "min",
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": "sketch"
+ }
+ }]
+}
+```
\ No newline at end of file
diff --git a/docs/38.0.0/development/extensions-contrib/moving-average-query.md b/docs/38.0.0/development/extensions-contrib/moving-average-query.md
new file mode 100644
index 000000000..0fcc9c4f5
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/moving-average-query.md
@@ -0,0 +1,364 @@
+---
+id: moving-average-query
+title: "Moving Average Query"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+## Overview
+**Moving Average Query** is an extension which provides support for [Moving Average](https://en.wikipedia.org/wiki/Moving_average) and other Aggregate [Window Functions](https://en.wikibooks.org/wiki/Structured_Query_Language/Window_functions) in Druid queries.
+
+These Aggregate Window Functions consume standard Druid Aggregators and outputs additional windowed aggregates called [Averagers](#averagers).
+
+#### High level algorithm
+
+Moving Average encapsulates the [groupBy query](../../querying/groupbyquery.md) (Or [timeseries](../../querying/timeseriesquery.md) in case of no dimensions) in order to rely on the maturity of these query types.
+
+It runs the query in two main phases:
+
+1. Runs an inner [groupBy](../../querying/groupbyquery.md) or [timeseries](../../querying/timeseriesquery.md) query to compute Aggregators (i.e. daily count of events).
+2. Passes over aggregated results in Broker, in order to compute Averagers (i.e. moving 7 day average of the daily count).
+
+#### Main enhancements provided by this extension:
+1. Functionality: Extending druid query functionality (i.e. initial introduction of Window Functions).
+2. Performance: Improving performance of such moving aggregations by eliminating multiple segment scans.
+
+#### Further reading
+[Moving Average](https://en.wikipedia.org/wiki/Moving_average)
+
+[Window Functions](https://en.wikibooks.org/wiki/Structured_Query_Language/Window_functions)
+
+[Analytic Functions](https://cloud.google.com/bigquery/docs/reference/standard-sql/analytic-function-concepts)
+
+
+## Operations
+
+### Installation
+Use [pull-deps](../../operations/pull-deps.md) tool shipped with Druid to install this [extension](../../configuration/extensions.md#community-extensions) on all Druid broker and router nodes.
+
+```bash
+java -classpath "<your_druid_dir>/lib/*" org.apache.druid.cli.Main tools pull-deps -c org.apache.druid.extensions.contrib:druid-moving-average-query:{VERSION}
+```
+
+### Enabling
+After installation, to enable this extension, just add `druid-moving-average-query` to `druid.extensions.loadList` in broker and routers' `runtime.properties` file and then restart broker and router nodes.
+
+For example:
+
+```bash
+druid.extensions.loadList=["druid-moving-average-query"]
+```
+
+## Configuration
+There are currently no configuration properties specific to Moving Average.
+
+## Limitations
+* movingAverage is missing support for the following groupBy properties: `subtotalsSpec`, `virtualColumns`.
+* movingAverage is missing support for the following timeseries properties: `descending`.
+* movingAverage averagers consider empty buckets and null aggregation values as 0 unless otherwise noted.
+
+## Query spec
+* Most properties in the query spec derived from [groupBy query](../../querying/groupbyquery.md) / [timeseries](../../querying/timeseriesquery.md), see documentation for these query types.
+
+|property|description|required?|
+|--------|-----------|---------|
+|queryType|This String should always be "movingAverage"; this is the first thing Druid looks at to figure out how to interpret the query.|yes|
+|dataSource|A String or Object defining the data source to query, very similar to a table in a relational database. See [DataSource](../../querying/datasource.md) for more information.|yes|
+|dimensions|A JSON list of [DimensionSpec](../../querying/dimensionspecs.md) (Notice that property is optional)|no|
+|limitSpec|See [LimitSpec](../../querying/limitspec.md)|no|
+|having|See [Having](../../querying/having.md)|no|
+|granularity|A period granularity; See [Period Granularities](../../querying/granularities.md#period-granularities)|yes|
+|filter|See [Filters](../../querying/filters.md)|no|
+|aggregations|Aggregations forms the input to Averagers; See [Aggregations](../../querying/aggregations.md)|yes|
+|postAggregations|Supports only aggregations as input; See [Post Aggregations](../../querying/post-aggregations.md)|no|
+|intervals|A JSON Object representing ISO-8601 Intervals. This defines the time ranges to run the query over.|yes|
+|context|An additional JSON Object which can be used to specify certain flags.|no|
+|averagers|Defines the moving average function; See [Averagers](#averagers)|yes|
+|postAveragers|Support input of both averagers and aggregations; Syntax is identical to postAggregations (See [Post Aggregations](../../querying/post-aggregations.md))|no|
+
+## Averagers
+
+Averagers are used to define the Moving-Average function. Averagers are not limited to an average - they can also provide other types of window functions such as MAX()/MIN().
+
+### Properties
+
+These are properties which are common to all Averagers:
+
+|property|description|required?|
+|--------|-----------|---------|
+|type|Averager type; See [Averager types](#averager-types)|yes|
+|name|Averager name|yes|
+|fieldName|Input name (An aggregation name)|yes|
+|buckets|Number of lookback buckets (time periods), including current one. Must be >0|yes|
+|cycleSize|Cycle size; Used to calculate day-of-week option; See [Cycle size (Day of Week)](#cycle-size-day-of-week)|no, defaults to 1|
+
+
+### Averager types:
+
+* [Standard averagers](#standard-averagers):
+ * doubleMean
+ * doubleMeanNoNulls
+ * doubleSum
+ * doubleMax
+ * doubleMin
+ * longMean
+ * longMeanNoNulls
+ * longSum
+ * longMax
+ * longMin
+
+#### Standard averagers
+
+These averagers offer four functions:
+
+* Mean (Average)
+* MeanNoNulls (Ignores empty buckets).
+* Sum
+* Max
+* Min
+
+**Ignoring nulls**:
+Using a MeanNoNulls averager is useful when the interval starts at the dataset beginning time.
+In that case, the first records will ignore missing buckets and average won't be artificially low.
+However, this also means that empty days in a sparse dataset will also be ignored.
+
+Example of usage:
+
+```json
+{ "type" : "doubleMean", "name" : <output_name>, "fieldName": <input_name> }
+```
+
+### Cycle size (Day of Week)
+This optional parameter is used to calculate over a single bucket within each cycle instead of all buckets.
+A prime example would be weekly buckets, resulting in a Day of Week calculation. (Other examples: Month of year, Hour of day).
+
+I.e. when using these parameters:
+
+* *granularity*: period=P1D (daily)
+* *buckets*: 28
+* *cycleSize*: 7
+
+Within each output record, the averager will compute the result over the following buckets: current (#0), #7, #14, #21.
+Whereas without specifying cycleSize it would have computed over all 28 buckets.
+
+## Examples
+
+All examples are based on the Wikipedia dataset provided in the Druid [tutorials](../../tutorials/index.md).
+
+### Basic example
+
+Calculating a 7-buckets moving average for Wikipedia edit deltas.
+
+Query syntax:
+
+```json
+{
+ "queryType": "movingAverage",
+ "dataSource": "wikipedia",
+ "granularity": {
+ "type": "period",
+ "period": "PT30M"
+ },
+ "intervals": [
+ "2015-09-12T00:00:00Z/2015-09-13T00:00:00Z"
+ ],
+ "aggregations": [
+ {
+ "name": "delta30Min",
+ "fieldName": "delta",
+ "type": "longSum"
+ }
+ ],
+ "averagers": [
+ {
+ "name": "trailing30MinChanges",
+ "fieldName": "delta30Min",
+ "type": "longMean",
+ "buckets": 7
+ }
+ ]
+}
+```
+
+Result:
+
+```json
+[ {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T00:30:00.000Z",
+ "event" : {
+ "delta30Min" : 30490,
+ "trailing30MinChanges" : 4355.714285714285
+ }
+ }, {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T01:00:00.000Z",
+ "event" : {
+ "delta30Min" : 96526,
+ "trailing30MinChanges" : 18145.14285714286
+ }
+ }, {
+...
+...
+...
+}, {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T23:00:00.000Z",
+ "event" : {
+ "delta30Min" : 119100,
+ "trailing30MinChanges" : 198697.2857142857
+ }
+}, {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T23:30:00.000Z",
+ "event" : {
+ "delta30Min" : 177882,
+ "trailing30MinChanges" : 193890.0
+ }
+}
+```
+
+### Post averager example
+
+Calculating a 7-buckets moving average for Wikipedia edit deltas, plus a ratio between the current period and the moving average.
+
+Query syntax:
+
+```json
+{
+ "queryType": "movingAverage",
+ "dataSource": "wikipedia",
+ "granularity": {
+ "type": "period",
+ "period": "PT30M"
+ },
+ "intervals": [
+ "2015-09-12T22:00:00Z/2015-09-13T00:00:00Z"
+ ],
+ "aggregations": [
+ {
+ "name": "delta30Min",
+ "fieldName": "delta",
+ "type": "longSum"
+ }
+ ],
+ "averagers": [
+ {
+ "name": "trailing30MinChanges",
+ "fieldName": "delta30Min",
+ "type": "longMean",
+ "buckets": 7
+ }
+ ],
+ "postAveragers" : [
+ {
+ "name": "ratioTrailing30MinChanges",
+ "type": "arithmetic",
+ "fn": "/",
+ "fields": [
+ {
+ "type": "fieldAccess",
+ "fieldName": "delta30Min"
+ },
+ {
+ "type": "fieldAccess",
+ "fieldName": "trailing30MinChanges"
+ }
+ ]
+ }
+ ]
+}
+```
+
+Result:
+
+```json
+[ {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T22:00:00.000Z",
+ "event" : {
+ "delta30Min" : 144269,
+ "trailing30MinChanges" : 204088.14285714287,
+ "ratioTrailing30MinChanges" : 0.7068955500319539
+ }
+}, {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T22:30:00.000Z",
+ "event" : {
+ "delta30Min" : 242860,
+ "trailing30MinChanges" : 214031.57142857142,
+ "ratioTrailing30MinChanges" : 1.134692411867141
+ }
+}, {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T23:00:00.000Z",
+ "event" : {
+ "delta30Min" : 119100,
+ "trailing30MinChanges" : 198697.2857142857,
+ "ratioTrailing30MinChanges" : 0.5994042624782422
+ }
+}, {
+ "version" : "v1",
+ "timestamp" : "2015-09-12T23:30:00.000Z",
+ "event" : {
+ "delta30Min" : 177882,
+ "trailing30MinChanges" : 193890.0,
+ "ratioTrailing30MinChanges" : 0.9174377224199288
+ }
+} ]
+```
+
+
+### Cycle size example
+
+Calculating an average of every first 10-minutes of the last 3 hours:
+
+Query syntax:
+
+```json
+{
+ "queryType": "movingAverage",
+ "dataSource": "wikipedia",
+ "granularity": {
+ "type": "period",
+ "period": "PT10M"
+ },
+ "intervals": [
+ "2015-09-12T00:00:00Z/2015-09-13T00:00:00Z"
+ ],
+ "aggregations": [
+ {
+ "name": "delta10Min",
+ "fieldName": "delta",
+ "type": "doubleSum"
+ }
+ ],
+ "averagers": [
+ {
+ "name": "trailing10MinPerHourChanges",
+ "fieldName": "delta10Min",
+ "type": "doubleMeanNoNulls",
+ "buckets": 18,
+ "cycleSize": 6
+ }
+ ]
+}
+```
diff --git a/docs/38.0.0/development/extensions-contrib/openlineage-emitter.md b/docs/38.0.0/development/extensions-contrib/openlineage-emitter.md
new file mode 100644
index 000000000..6e613cf63
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/openlineage-emitter.md
@@ -0,0 +1,98 @@
+---
+id: openlineage-emitter
+title: "OpenLineage Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `openlineage-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits [OpenLineage](https://openlineage.io) `RunEvent`s for each completed Druid query, enabling data lineage tracking with any OpenLineage-compatible backend such as [Marquez](https://marquezproject.ai).
+
+For MSQ DML statements (`INSERT INTO` / `REPLACE INTO`), the output datasource is extracted from the SQL text and emitted as an output dataset. Input extraction from SQL is not performed — reliably resolving `FROM` / `JOIN` tables at the logger layer would duplicate planner work. For native queries, input table names are resolved from the datasource tree and emitted as input datasets. Native sub-queries spawned by a SQL execution carry a `sqlQueryId` in their context facet for correlatio [...]
+
+:::note
+MSQ DML output extraction relies on `calcite-core` being on the classpath, which is the case on Broker nodes. Native query lineage is available on all nodes.
+:::
+
+## Configuration
+
+All configuration parameters are under `druid.request.logging`.
+
+| Property | Description | Required | Default |
+|---|---|---|---|
+| `druid.request.logging.type` | Set to `openlineage` to enable this extension. | yes | — |
+| `druid.request.logging.namespace` | Namespace used for OpenLineage job and dataset URIs. Typically the Broker URL. | no | `druid://<hostname>` |
+| `druid.request.logging.transportType` | Where to send events. `CONSOLE` logs JSON to the Druid log; `HTTP` POSTs to an OpenLineage API endpoint. | no | `CONSOLE` |
+| `druid.request.logging.transportUrl` | OpenLineage API endpoint URL. Required when `transportType=HTTP`. | no | — |
+| `druid.request.logging.excludedNativeQueryTypes` | Native query types to exclude from lineage emission. Internal broker queries like segment metadata lookups produce noisy, low-value events. | no | `["segmentMetadata", "dataSourceMetadata", "timeBoundary"]` |
+| `druid.request.logging.emitQueueCapacity` | Maximum number of events buffered in the async HTTP emit queue. Events are dropped (with a warning) when the queue is full. Only applies when `transportType=HTTP`. | no | `1000` |
+| `druid.request.logging.emitThreadCount` | Number of background threads used to POST events to the HTTP endpoint. Only applies when `transportType=HTTP`. | no | `1` |
+| `druid.request.logging.trustStorePath` | Path to the TrustStore file for HTTPS transport. Only applies when `transportType=HTTP`. | no | — |
+| `druid.request.logging.trustStorePassword` | Password for the TrustStore. Accepts a plain string or a [PasswordProvider](../../operations/password-provider.md) (e.g. an environment variable). Only applies when `transportType=HTTP`. | no | — |
+| `druid.request.logging.keyStorePath` | Path to the KeyStore file for mutual TLS. Only applies when `transportType=HTTP`. | no | — |
+| `druid.request.logging.keyStorePassword` | Password for the KeyStore. Accepts a plain string or a [PasswordProvider](../../operations/password-provider.md). Only applies when `transportType=HTTP`. | no | — |
+
+### Examples
+
+**Console (development)**
+
+```properties
+druid.request.logging.type=openlineage
+druid.request.logging.namespace=druid://broker.prod:8082
+```
+
+**HTTP (production)**
+
+```properties
+druid.request.logging.type=openlineage
+druid.request.logging.namespace=druid://broker.prod:8082
+druid.request.logging.transportType=HTTP
+druid.request.logging.transportUrl=http://marquez:5000/api/v1/lineage
+```
+
+**Combined with another logger using the `composing` provider**
+
+```properties
+druid.request.logging.type=composing
+druid.request.logging.loggerProviders=[{"type":"slf4j"},{"type":"openlineage","namespace":"druid://broker.prod:8082","transportType":"HTTP","transportUrl":"http://marquez:5000/api/v1/lineage"}]
+```
+
+## Event structure
+
+Each emitted event follows the [OpenLineage spec](https://openlineage.io/spec/2-0-2/OpenLineage.json) and includes the following facets.
+
+### Run facets
+
+| Facet | Description |
+|---|---|
+| `processing_engine` | Engine name (`druid`). Standard OpenLineage facet. |
+| `druid_query_context` | Query metadata: `identity` (authenticated user), `remoteAddress`, `queryType`, and `sqlQueryId` (on native sub-queries of SQL, for correlation with the parent SQL event). |
+| `druid_query_statistics` | Execution stats: `durationMs`, `bytes`, `planningTimeMs`, `statusCode`. |
+| `errorMessage` | Exception message for failed queries. Standard OpenLineage facet. |
+
+### Job facets
+
+| Facet | Description |
+|---|---|
+| `jobType` | `processingType=BATCH`, `integration=DRUID`, `jobType=QUERY`. Standard OpenLineage facet. |
+| `sql` | Raw SQL text. Present on SQL queries only. Standard OpenLineage facet. |
diff --git a/docs/38.0.0/development/extensions-contrib/opentsdb-emitter.md b/docs/38.0.0/development/extensions-contrib/opentsdb-emitter.md
new file mode 100644
index 000000000..e13cd5b55
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/opentsdb-emitter.md
@@ -0,0 +1,62 @@
+---
+id: opentsdb-emitter
+title: "OpenTSDB Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `opentsdb-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits druid metrics to [OpenTSDB](https://github.com/OpenTSDB/opentsdb) over HTTP (Using `Jersey client`). And this emitter only emits service metric events to OpenTSDB (See [Druid metrics](../../operations/metrics.md) for a list of metrics).
+
+## Configuration
+
+All the configuration parameters for the OpenTSDB emitter are under `druid.emitter.opentsdb`.
+
+|property|description|required?|default|
+|--------|-----------|---------|-------|
+|`druid.emitter.opentsdb.host`|The host of the OpenTSDB server.|yes|none|
+|`druid.emitter.opentsdb.port`|The port of the OpenTSDB server.|yes|none|
+|`druid.emitter.opentsdb.connectionTimeout`|`Jersey client` connection timeout(in milliseconds).|no|2000|
+|`druid.emitter.opentsdb.readTimeout`|`Jersey client` read timeout(in milliseconds).|no|2000|
+|`druid.emitter.opentsdb.flushThreshold`|Queue flushing threshold.(Events will be sent as one batch)|no|100|
+|`druid.emitter.opentsdb.maxQueueSize`|Maximum size of the queue used to buffer events.|no|1000|
+|`druid.emitter.opentsdb.consumeDelay`|Queue consuming delay(in milliseconds). Actually, we use `ScheduledExecutorService` to schedule consuming events, so this `consumeDelay` means the delay between the termination of one execution and the commencement of the next. If your druid processes produce metric events fast, then you should decrease this `consumeDelay` or increase the `maxQueueSize`.|no|10000|
+|`druid.emitter.opentsdb.metricMapPath`|JSON file defining the desired metrics and dimensions for every Druid metric|no|./src/main/resources/defaultMetrics.json|
+|`druid.emitter.opentsdb.namespacePrefix`|Optional (string) prefix for metric names, for example the default metric name `query.count` with a namespacePrefix set to `druid` would be emitted as `druid.query.count` |no|null|
+
+### Druid to OpenTSDB Event Converter
+
+The OpenTSDB emitter will send only the desired metrics and dimensions which is defined in a JSON file.
+If the user does not specify their own JSON file, a default file is used. All metrics are expected to be configured in the JSON file. Metrics which are not configured will be logged.
+Desired metrics and dimensions is organized using the following schema:`<druid metric name> : [ <dimension list> ]`<br />
+e.g.
+
+```json
+"query/time": [
+ "dataSource",
+ "type"
+]
+```
+
+For most use-cases, the default configuration is sufficient.
diff --git a/docs/38.0.0/development/extensions-contrib/prometheus.md b/docs/38.0.0/development/extensions-contrib/prometheus.md
new file mode 100644
index 000000000..2b4b042be
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/prometheus.md
@@ -0,0 +1,117 @@
+---
+id: prometheus
+title: "Prometheus Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `prometheus-emitter` in the extensions load list.
+
+## Introduction
+
+This extension exposes [Druid metrics](https://druid.apache.org/docs/latest/operations/metrics.html) for collection by a Prometheus server (https://prometheus.io/).
+
+Emitter is enabled by setting `druid.emitter=prometheus` [configs](https://druid.apache.org/docs/latest/configuration/index.html#enabling-metrics) or include `prometheus` in the composing emitter list.
+
+## Configuration
+
+All the configuration parameters for the Prometheus emitter are under `druid.emitter.prometheus`.
+
+| property | description | required? | default |
+|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|--------------------------------------|
+| `druid.emitter.prometheus.strategy` | The strategy to expose prometheus metrics. <br/>Should be one of `exporter` and `pushgateway`. Default strategy `exporter` would expose metrics for scraping purpose. Peon tasks (short-lived jobs) should use `pushgateway` strategy. | yes | exporter |
+| `druid.emitter.prometheus.port` | The port on which to expose the prometheus HTTPServer. Required if using `exporter` strategy. | no | none |
+| `druid.emitter.prometheus.namespace` | Optional metric namespace. Must match the regex `[a-zA-Z_:][a-zA-Z0-9_:]*` | no | druid |
+| `druid.emitter.prometheus.dimensionMapPath` | JSON file defining the Prometheus metric type, desired dimensions, conversionFactor, histogram buckets and help text for every Druid metric. | no | Default mapping provided. See below. |
+| `druid.emitter.prometheus.addHostAsLabel` | Flag to include the hostname as a prometheus label. | no | false |
+| `druid.emitter.prometheus.addServiceAsLabel` | Flag to include the druid service name (e.g. `druid/broker`, `druid/coordinator`, etc.) as a prometheus label. | no | false |
+| `druid.emitter.prometheus.pushGatewayAddress` | Pushgateway address. Required if using `pushgateway` strategy. | no | none |
+| `druid.emitter.prometheus.flushPeriod` | When using the `pushgateway` strategy metrics are emitted every `flushPeriod` seconds. <br/>When using the `exporter` strategy this configures the metric TTL such that if the metric value is not updated within `flushPeriod` seconds then it will stop being emitted. Note that the TTL applies for each unique label combination per metric. It is recommended to set this to at least 3 * `scrape_interval`. | Required if `pushgateway` strategy is [...]
+| `druid.emitter.prometheus.extraLabels` | JSON key-value pairs for additional labels on all metrics. Keys (label names) must match the regex `[a-zA-Z_:][a-zA-Z0-9_:]*`. Example: `{"cluster_name": "druid_cluster1", "env": "staging"}`. | no | none |
+| `druid.emitter.prometheus.deletePushGatewayMetricsOnShutdown` | Flag to delete metrics from Pushgateway on task shutdown. Works only if `pushgateway` strategy is used. This feature allows to delete a stale metrics from batch executed tasks. Otherwise, the Pushgateway will store these stale metrics indefinitely as there is [no time to live mechanism](https://github.com/prometheus/pushgateway/issues/117), using the memory to hold data that was already scraped by Prometheus. | no | false |
+| `druid.emitter.prometheus.waitForShutdownDelay` | Time in milliseconds to wait for peon tasks to delete metrics from the Pushgateway on shutdown (e.g. 60_000). Applicable only when `pushgateway` strategy is used and `deletePushGatewayMetricsOnShutdown` is set to true. There is no guarantee that a peon task will delete metrics from the gateway if the configured delay is more than the [Peon's `druid.indexer.task.gracefulShutdownTimeout`](https://druid.apache.org/docs/latest/configuration [...]
+
+### Ports for colocated Druid processes
+
+In certain instances, Druid processes may be colocated on the same host. For example, the Broker and Router may share the same server. Other colocated processes include the Historical and Middle Manager or the Coordinator and Overlord. When you have colocated processes, specify `druid.emitter.prometheus.port` separately for each process on each host. For example, even if the Broker and Router share the same host, the Broker runtime properties and the Router runtime properties each need t [...]
+
+### Override properties for Peon Tasks
+
+Peon tasks are created dynamically by middle managers and have dynamic host and port addresses. Since the `exporter` strategy allows Prometheus to read only from a fixed address, it cannot be used for peon tasks.
+So, these tasks need to be configured to use `pushgateway` strategy to push metrics from Druid to prometheus gateway.
+
+If this emitter is configured to use `exporter` strategy globally, some of the above configurations need to be overridden in the middle manager so that spawned peon tasks can still use the `pushgateway` strategy.
+
+```
+#
+# Override global prometheus emitter configuration for peon tasks to use `pushgateway` strategy.
+# Other configurations can also be overridden by adding `druid.indexer.fork.property.` prefix to above configuration properties.
+#
+druid.indexer.fork.property.druid.emitter.prometheus.strategy=pushgateway
+druid.indexer.fork.property.druid.emitter.prometheus.pushGatewayAddress=http://<push-gateway-address>
+```
+
+### Metric names
+
+All metric names and labels are reformatted to match Prometheus standards.
+- For names: all characters which are not alphanumeric, underscores, or colons (matching `[^a-zA-Z_:][^a-zA-Z0-9_:]*`) are replaced with `_`
+- For labels: all characters which are not alphanumeric or underscores (matching `[^a-zA-Z0-9_][^a-zA-Z0-9_]*`) are replaced with `_`
+
+### Metric mapping
+
+Each metric to be collected by Prometheus must specify a type, one of `[timer, counter, guage]`. Prometheus Emitter expects this mapping to
+be provided as a JSON file. Additionally, this mapping specifies which dimensions should be included for each metric. Prometheus expects
+histogram timers to use Seconds as the base unit. Timers which do not use seconds as a base unit can use the `conversionFactor` to set
+the base time unit. Histogram timers also support custom bucket configurations through the `histogramBuckets` parameter. If no custom buckets are provided, the following default buckets are used: `[0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 30.0, 60.0, 120.0, 300.0]`. If the user does not specify their own JSON file, a default mapping is used. All
+metrics are expected to be mapped. Metrics which are not mapped will not be tracked.
+
+Prometheus metric path is organized using the following schema:
+
+```json
+<druid metric name> : {
+ "dimensions" : <dimension list>,
+ "type" : <timer|counter|gauge>,
+ "conversionFactor": <conversionFactor>,
+ "histogramBuckets": <array of bucket values for timer metric>,
+ "help" : <help text>
+}
+```
+
+For example:
+```json
+"query/time" : {
+ "dimensions" : ["dataSource", "type"],
+ "type" : "timer",
+ "conversionFactor": 1000.0,
+ "histogramBuckets": [0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 30.0, 60.0, 120.0, 300.0],
+ "help": "Seconds taken to complete a query."
+}
+```
+
+For metrics which are emitted from multiple services with different dimensions, the metric name is prefixed with
+the service name. For example:
+
+```json
+"druid/coordinator-segment/count" : { "dimensions" : ["dataSource"], "type" : "gauge" },
+"druid/historical-segment/count" : { "dimensions" : ["dataSource", "tier", "priority"], "type" : "gauge" }
+```
+
+For most use cases, the default mapping is sufficient.
diff --git a/docs/38.0.0/development/extensions-contrib/rabbit-stream-ingestion.md b/docs/38.0.0/development/extensions-contrib/rabbit-stream-ingestion.md
new file mode 100644
index 000000000..9c0e39518
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/rabbit-stream-ingestion.md
@@ -0,0 +1,238 @@
+---
+id: rabbit-super-stream-injestion
+title: "RabbitMQ superstream ingestion"
+sidebar_label: "Rabbitmq superstream"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+The rabbit stream indexing service allows you to configure *supervisors* on the Overlord to manage the creation and lifetime of [RabbitMQ](https://www.rabbitmq.com/) indexing tasks.
+These indexing tasks read events from a rabbit super-stream. The supervisor oversees the state of the indexing tasks to:
+
+ - coordinate handoffs
+ - manage failures
+ - ensure that Druid maintains scalability and replication requirements
+
+ To use the rabbit stream indexing service, load the `druid-rabbit-indexing-service` community druid extension.
+ See [Loading community extensions](../../configuration/extensions.md#loading-community-extensions) for more information.
+
+## Submitting a supervisor spec
+
+To use the rabbit stream indexing service, load the `druid-rabbit-indexing-service` extension on both the Overlord and the Middle Managers. Druid starts a supervisor for a dataSource when you submit a supervisor spec. Submit your supervisor spec to the following endpoint:
+
+
+`http://<OVERLORD_IP>:<OVERLORD_PORT>/druid/indexer/v1/supervisor`
+
+For example:
+
+```
+curl -X POST -H 'Content-Type: application/json' -d @supervisor-spec.json http://localhost:8090/druid/indexer/v1/supervisor
+```
+
+Where the file `supervisor-spec.json` contains a rabbit supervisor spec:
+
+```json
+{
+ "type": "rabbit",
+ "spec": {
+ "dataSchema": {
+ "dataSource": "metrics-rabbit",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "auto"
+ },
+ "dimensionsSpec": {
+ "dimensions": [],
+ "dimensionExclusions": [
+ "timestamp",
+ "value"
+ ]
+ },
+ "metricsSpec": [
+ {
+ "name": "count",
+ "type": "count"
+ },
+ {
+ "name": "value_sum",
+ "fieldName": "value",
+ "type": "doubleSum"
+ },
+ {
+ "name": "value_min",
+ "fieldName": "value",
+ "type": "doubleMin"
+ },
+ {
+ "name": "value_max",
+ "fieldName": "value",
+ "type": "doubleMax"
+ }
+ ],
+ "granularitySpec": {
+ "type": "uniform",
+ "segmentGranularity": "HOUR",
+ "queryGranularity": "NONE"
+ }
+ },
+ "ioConfig": {
+ "stream": "metrics",
+ "inputFormat": {
+ "type": "json"
+ },
+ "uri": "rabbitmq-stream://localhost:5552",
+ "taskCount": 1,
+ "replicas": 1,
+ "taskDuration": "PT1H"
+ },
+ "tuningConfig": {
+ "type": "rabbit",
+ "maxRowsPerSegment": 5000000
+ }
+ }
+}
+```
+
+## Supervisor spec
+
+|Field|Description|Required|
+|--------|-----------|---------|
+|`type`|The supervisor type; this should always be `rabbit`.|yes|
+|`spec`|Container object for the supervisor configuration.|yes|
+|`dataSchema`|The schema that will be used by the rabbit indexing task during ingestion. See [`dataSchema`](../../ingestion/ingestion-spec.md#dataschema).|yes|
+|`ioConfig`|An [`ioConfig`](#ioconfig) object for configuring rabbit super stream connection and I/O-related settings for the supervisor and indexing task.|yes|
+|`tuningConfig`|A [`tuningConfig`](#tuningconfig) object for configuring performance-related settings for the supervisor and indexing tasks.|no|
+
+### `ioConfig`
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|`stream`|String|The RabbitMQ super stream to read.|yes|
+|`inputFormat`|Object|The input format to specify how to parse input data. See [`inputFormat`](../../ingestion/data-formats.md#input-format) for details.|yes|
+|`uri`|String|The URI to connect to RabbitMQ with. |yes |
+|`replicas`|Integer|The number of replica sets, where 1 means a single set of tasks (no replication). Replica tasks will always be assigned to different workers to provide resiliency against process failure.|no (default == 1)|
+|`taskCount`|Integer|The maximum number of *reading* tasks in a *replica set*. This means that the maximum number of reading tasks will be `taskCount * replicas` and the total number of tasks (*reading* + *publishing*) will be higher than this. |no (default == 1)|
+|`taskDuration`|ISO8601 Period|The length of time before tasks stop reading and begin publishing their segment.|no (default == PT1H)|
+|`startDelay`|ISO8601 Period|The period to wait before the supervisor starts managing tasks.|no (default == PT5S)|
+|`period`|ISO8601 Period|How often the supervisor will execute its management logic. Note that the supervisor will also run in response to certain events (such as tasks succeeding, failing, and reaching their taskDuration) so this value specifies the maximum time between iterations.|no (default == PT30S)|
+|`useEarliestSequenceNumber`|Boolean|If a supervisor is managing a dataSource for the first time, it will obtain a set of starting sequence numbers from RabbitMQ. This flag determines whether it retrieves the earliest or latest sequence numbers in the stream. Under normal circumstances, subsequent tasks will start from where the previous segments ended so this flag will only be used on first run.|no (default == false)|
+|`completionTimeout`|ISO8601 Period|The length of time to wait before declaring a publishing task as failed and terminating it. If this is set too low, your tasks may never publish. The publishing clock for a task begins roughly after `taskDuration` elapses.|no (default == PT6H)|
+|`lateMessageRejectionPeriod`|ISO8601 Period|Configure tasks to reject messages with timestamps earlier than this period before the task was created; for example if this is set to `PT1H` and the supervisor creates a task at *2016-01-01T12:00Z*, messages with timestamps earlier than *2016-01-01T11:00Z* will be dropped. This may help prevent concurrency issues if your data stream has late messages and you have multiple pipelines that need to operate on the same segments (e.g. a realtime an [...]
+|`earlyMessageRejectionPeriod`|ISO8601 Period|Configure tasks to reject messages with timestamps later than this period after the task reached its taskDuration; for example if this is set to `PT1H`, the taskDuration is set to `PT1H` and the supervisor creates a task at *2016-01-01T12:00Z*. Messages with timestamps later than *2016-01-01T14:00Z* will be dropped. **Note:** Tasks sometimes run past their task duration, for example, in cases of supervisor failover. Setting `earlyMessageRejec [...]
+|`Consumer Properties`|Object| a dynamic map used to provide |no (default == none)|
+
+<a name="tuningconfig"></a>
+
+### `tuningConfig`
+
+The `tuningConfig` is optional. If no `tuningConfig` is specified, default parameters are used.
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|`type`| String|The indexing task type, this should always be `rabbit`.|yes|
+|`maxRowsInMemory`|Integer|The number of rows to aggregate before persisting. This number is the post-aggregation rows, so it is not equivalent to the number of input events, but the number of aggregated rows that those events result in. This is used to manage the required JVM heap size. Maximum heap memory usage for indexing scales with `maxRowsInMemory * (2 + maxPendingPersists)`.|no (default == 100000)|
+|`maxBytesInMemory`|Long| The number of bytes to aggregate in heap memory before persisting. This is based on a rough estimate of memory usage and not actual usage. Normally, this is computed internally and user does not need to set it. The maximum heap memory usage for indexing is `maxBytesInMemory * (2 + maxPendingPersists)`.|no (default == One-sixth of max JVM memory)|
+|`maxRowsPerSegment`|Integer|The number of rows to aggregate into a segment; this number is post-aggregation rows. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.|no (default == 5000000)|
+|`maxTotalRows`|Long|The number of rows to aggregate across all segments; this number is post-aggregation rows. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.|no (default == unlimited)|
+|`intermediatePersistPeriod`|ISO8601 Period|The period that determines the rate at which intermediate persists occur.|no (default == PT10M)|
+|`maxPendingPersists`|Integer|Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with `maxRowsInMemory * (2 + maxPendingPersists)`.|no (default == 0, meaning one persist can be running concurrently with ingestion, and none can be queued up)|
+|`indexSpec`|Object|Tune how data is indexed. See [IndexSpec](#indexspec) for more information.|no|
+|`indexSpecForIntermediatePersists`|Object|Defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. This can be used to disable dimension/metric compression on intermediate segments to reduce memory required for final merging. However, disabling compression on intermediate segments might increase page cache use while they are used before getting merged into final segment published, see [IndexSpec](#indexspec) for possible values.| [...]
+|`reportParseExceptions`|Boolean|If true, exceptions encountered during parsing will be thrown and will halt ingestion; if false, unparseable rows and fields will be skipped.|no (default == false)|
+|`handoffConditionTimeout`|Long| Milliseconds to wait for segment handoff. It must be >= 0, where 0 means to wait forever.| no (default == 0)|
+|`resetOffsetAutomatically`|Boolean|Controls behavior when Druid needs to read RabbitMQ messages that are no longer available. Not supported. |no (default == false)|
+|`skipSequenceNumberAvailabilityCheck`|Boolean|Whether to enable checking if the current sequence number is still available in a particular RabbitMQ stream. If set to false, the indexing task will attempt to reset the current sequence number (or not), depending on the value of `resetOffsetAutomatically`.|no (default == false)|
+|`workerThreads`|Integer|The number of threads that the supervisor uses to handle requests/responses for worker tasks, along with any other internal asynchronous operation.|no (default == min(10, taskCount))|
+|`chatRetries`|Integer|The number of times HTTP requests to indexing tasks will be retried before considering tasks unresponsive.| no (default == 8)|
+|`httpTimeout`|ISO8601 Period|How long to wait for a HTTP response from an indexing task.|no (default == PT10S)|
+|`shutdownTimeout`|ISO8601 Period|How long to wait for the supervisor to attempt a graceful shutdown of tasks before exiting.|no (default == PT80S)|
+|`recordBufferSize`|Integer|Size of the buffer (number of events) used between the RabbitMQ consumers and the main ingestion thread.|no ( default == 100 MB or an estimated 10% of available heap, whichever is smaller.)|
+|`recordBufferOfferTimeout`|Integer|Length of time in milliseconds to wait for space to become available in the buffer before timing out.| no (default == 5000)| |
+|`segmentWriteOutMediumFactory`|Object|Segment write-out medium to use when creating segments. See below for more information.|no (not specified by default, the value from `druid.peon.defaultSegmentWriteOutMediumFactory.type` is used)|
+|`intermediateHandoffPeriod`|ISO8601 Period|How often the tasks should hand off segments. Handoff will happen either if `maxRowsPerSegment` or `maxTotalRows` is hit or every `intermediateHandoffPeriod`, whichever happens earlier.| no (default == P2147483647D)|
+|`logParseExceptions`|Boolean|If true, log an error message when a parsing exception occurs, containing information about the row where the error occurred.|no, default == false|
+|`maxParseExceptions`|Integer|The maximum number of parse exceptions that can occur before the task halts ingestion and fails. Overridden if `reportParseExceptions` is set.|no, unlimited default|
+|`maxSavedParseExceptions`|Integer|When a parse exception occurs, Druid can keep track of the most recent parse exceptions. `maxSavedParseExceptions` limits how many exception instances Druid saves. These saved exceptions are made available after the task finishes in the [task completion report](../../ingestion/tasks.md#task-reports). Overridden if `reportParseExceptions` is set.|no, default == 0|
+|`maxRecordsPerPoll`|Integer|The maximum number of records/events to be fetched from buffer per poll. The actual maximum will be `Max(maxRecordsPerPoll, Max(bufferSize, 1))`|no, default = 100|
+|`repartitionTransitionDuration`|ISO8601 Period|When shards are split or merged, the supervisor will recompute shard -> task group mappings, and signal any running tasks created under the old mappings to stop early at (current time + `repartitionTransitionDuration`). Stopping the tasks early allows Druid to begin reading from the new shards more quickly. The repartition transition wait time controlled by this property gives the stream additional time to write records to the new shards af [...]
+|`offsetFetchPeriod`|ISO8601 Period|How often the supervisor queries RabbitMQ and the indexing tasks to fetch current offsets and calculate lag. If the user-specified value is below the minimum value (`PT5S`), the supervisor ignores the value and uses the minimum value instead.|no (default == PT30S, min == PT5S)|
+
+
+#### IndexSpec
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|bitmap|Object|Compression format for bitmap indexes. Should be a JSON object. See [Bitmap types](#bitmap-types) below for options.|no (defaults to Roaring)|
+|dimensionCompression|String|Compression format for dimension columns. Choose from `LZ4`, `LZF`, or `uncompressed`.|no (default == `LZ4`)|
+|metricCompression|String|Compression format for primitive type metric columns. Choose from `LZ4`, `LZF`, `uncompressed`, or `none`.|no (default == `LZ4`)|
+|longEncoding|String|Encoding format for metric and dimension columns with type long. Choose from `auto` or `longs`. `auto` encodes the values using sequence number or lookup table depending on column cardinality, and store them with variable size. `longs` stores the value as is with 8 bytes each.|no (default == `longs`)|
+
+##### Bitmap types
+
+For Roaring bitmaps:
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|`type`|String|Must be `roaring`.|yes|
+
+For Concise bitmaps:
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|`type`|String|Must be `concise`.|yes|
+
+#### SegmentWriteOutMediumFactory
+
+|Field|Type|Description|Required|
+|-----|----|-----------|--------|
+|`type`|String|See [Additional Peon configuration: SegmentWriteOutMediumFactory](../../configuration/index.md#segmentwriteoutmediumfactory) for explanation and available options.|yes|
+
+
+
+## Operations
+
+This section describes how some supervisor APIs work in the Rabbit Stream Indexing Service.
+For all supervisor APIs, check [Supervisor APIs](../../api-reference/supervisor-api.md).
+
+### RabbitMQ authentication
+
+To authenticate with RabbitMQ securely, you must provide a username and password, as well as configure
+a certificate if you aren't using a standard certificate provider.
+
+In order to configure these, use the dynamic configuration provider of the ioConfig:
+```
+ "ioConfig": {
+ "type": "rabbit",
+ "stream": "api-audit",
+ "uri": "rabbitmq-stream://localhost:5552",
+ "taskCount": 1,
+ "replicas": 1,
+ "taskDuration": "PT1H",
+ "consumerProperties": {
+ "druid.dynamic.config.provider" : {
+ "type": "environment",
+ "variables": {
+ "username": "RABBIT_USERNAME",
+ "password": "RABBIT_PASSWORD"
+ }
+ }
+ }
+ },
+ ```
\ No newline at end of file
diff --git a/docs/latest/development/extensions-contrib/redis-cache.md b/docs/38.0.0/development/extensions-contrib/redis-cache.md
similarity index 95%
copy from docs/latest/development/extensions-contrib/redis-cache.md
copy to docs/38.0.0/development/extensions-contrib/redis-cache.md
index 63e0b9e50..c1c76fe74 100644
--- a/docs/latest/development/extensions-contrib/redis-cache.md
+++ b/docs/38.0.0/development/extensions-contrib/redis-cache.md
@@ -84,6 +84,8 @@ Except for the properties above, there are some extra properties which can be cu
| Properties |Description|Default|Required|
|--------------------|-----------|-------|--------|
|`druid.cache.password`| Password to access redis server/cluster | None |no|
+|`druid.cache.enableTls`| Whether to connect to the redis server/cluster over TLS | false |no|
+|`druid.cache.skipTlsHostnameVerification`| When TLS is enabled, skip verifying that the server certificate matches the redis hostname | false |no|
|`druid.cache.expiration`|Expiration for cache entries | P1D |no|
|`druid.cache.timeout`|Timeout for connecting to Redis and reading entries from Redis|PT2S|no|
|`druid.cache.maxTotalConnections`|Max total connections to Redis|8|no|
diff --git a/docs/38.0.0/development/extensions-contrib/spectator-histogram.md b/docs/38.0.0/development/extensions-contrib/spectator-histogram.md
new file mode 100644
index 000000000..64d21ff9c
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/spectator-histogram.md
@@ -0,0 +1,586 @@
+---
+id: spectator-histogram
+title: "Spectator Histogram module"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+## Summary
+This module provides Apache Druid approximate histogram aggregators and percentile
+post-aggregators based on Spectator fixed-bucket histograms.
+
+Consider SpectatorHistogram to compute percentile approximations. This extension has a reduced storage footprint compared to the [DataSketches extension](../extensions-core/datasketches-extension.md), which results in smaller segment sizes, faster loading from deep storage, and lower memory usage. This extension provides fast and accurate queries on large datasets at low storage cost.
+
+This aggregator only applies when your raw data contains positive long integer values. Do not use this aggregator if you have negative values in your data.
+
+In the Druid instance shown below, the example Wikipedia dataset is loaded 3 times.
+* `wikipedia` contains the dataset ingested as is, without rollup
+* `wikipedia_spectator` contains the dataset with a single extra metric column of type `spectatorHistogram` for the `added` column
+* `wikipedia_datasketch` contains the dataset with a single extra metric column of type `quantilesDoublesSketch` for the `added` column
+
+Spectator histograms average just 6 extra bytes per row, while the `quantilesDoublesSketch`
+adds 48 bytes per row. This represents an eightfold reduction in additional storage size for spectator histograms.
+
+
+
+As rollup improves, so does the size savings. For example, when you ingest the Wikipedia dataset
+with day-grain query granularity and remove all dimensions except `countryName`,
+this results in a segment that has just 106 rows. The base segment has 87 bytes per row.
+Compare the following bytes per row for SpectatorHistogram versus DataSketches:
+* An additional `spectatorHistogram` column adds 27 bytes per row on average.
+* An additional `quantilesDoublesSketch` column adds 255 bytes per row.
+
+SpectatorHistogram reduces the additional storage size by 9.4 times in this example.
+Storage gains will differ per dataset depending on the variance and rollup of the data.
+
+## Background
+[Spectator](https://netflix.github.io/atlas-docs/spectator/) is a simple library
+for instrumenting code to record dimensional time series data.
+It was built, primarily, to work with [Atlas](https://netflix.github.io/atlas-docs/).
+Atlas was developed by Netflix to manage dimensional time series data for near
+real-time operational insight.
+
+With the [Atlas-Druid](https://github.com/Netflix-Skunkworks/iep-apps/tree/main/atlas-druid)
+service, it's possible to use the power of Atlas queries, backed by Druid as a
+data store to benefit from high-dimensionality and high-cardinality data.
+
+SpectatorHistogram is designed for efficient parallel aggregations while still
+allowing for filtering and grouping by dimensions.
+It provides similar functionality to the built-in DataSketches `quantilesDoublesSketch` aggregator, but is
+opinionated to maintain higher absolute accuracy at smaller values.
+Larger values have lower absolute accuracy; however, relative accuracy is maintained across the range.
+See [Bucket boundaries](#histogram-bucket-boundaries) for more information.
+The SpectatorHistogram is optimized for typical measurements from cloud services and web apps,
+such as page load time, transferred bytes, response time, and request latency.
+
+Through some trade-offs SpectatorHistogram provides a significantly more compact
+representation with the same aggregation performance and accuracy as
+DataSketches Quantiles Sketch. Note that results depend on the dataset.
+Also see the [limitations](#limitations] of this extension.
+
+## Limitations
+* Supports positive long integer values within the range of [0, 2^53). Negatives are
+coerced to 0.
+* Does not support decimals.
+* Generates 276 fixed buckets with increasing bucket widths. In practice, the observed error of computed percentiles ranges from 0.1% to 3%, exclusive. See [Bucket boundaries](#histogram-bucket-boundaries) for the full list of bucket boundaries.
+
+:::tip
+If these limitations don't work for your use case, then use [DataSketches](../extensions-core/datasketches-extension.md) instead.
+:::
+
+## Functionality
+The SpectatorHistogram aggregator can generate histograms from raw numeric
+values as well as aggregating or combining pre-aggregated histograms generated using
+the SpectatorHistogram aggregator itself.
+While you can generate histograms on the fly at query time, it is generally more
+performant to generate histograms during ingestion and then combine them at
+query time. This is especially true where rollup is enabled. It may be misleading or
+incorrect to generate histograms from already rolled-up summed data.
+
+The module provides postAggregators, `percentileSpectatorHistogram` (singular) and
+`percentilesSpectatorHistogram` (plural), to compute approximate
+percentiles from histograms generated by the SpectatorHistogram aggregator.
+Again, these postAggregators can be used to compute percentiles from raw numeric
+values via the SpectatorHistogram aggregator or from pre-aggregated histograms.
+
+> If you're only using the aggregator to compute percentiles from raw numeric values,
+then you can use the built-in quantilesDoublesSketch aggregator instead. The performance
+and accuracy are comparable. However, the DataSketches aggregator supports negative values,
+and you don't need to download an additional extension.
+
+An aggregated SpectatorHistogram can also be queried using a `longSum` or `doubleSum`
+aggregator to retrieve the population of the histogram. This is effectively the count
+of the number of values that were aggregated into the histogram. This flexibility can
+avoid the need to maintain a separate metric for the count of values.
+
+For high-frequency measurements, you may need to pre-aggregate data at the client prior
+to sending into Druid. For example, if you're measuring individual image render times
+on an image-heavy website, you may want to aggregate the render times for a page-view
+into a single histogram prior to sending to Druid in real-time. This can reduce the
+amount of data that's needed to send from the client across the wire.
+
+SpectatorHistogram supports ingesting pre-aggregated histograms in real-time and batch.
+They can be sent as a JSON map, keyed by the spectator bucket ID and the value is the
+count of values. This is the same format as the serialized JSON representation of the
+histogram. The keys need not be ordered or contiguous. For example:
+
+```json
+{ "4": 8, "5": 15, "6": 37, "7": 9, "8": 3, "10": 1, "13": 1 }
+```
+
+## Loading the extension
+To use SpectatorHistogram, make sure you [include](../../configuration/extensions.md#loading-extensions) the extension in your config file:
+
+```
+druid.extensions.loadList=["druid-spectator-histogram"]
+```
+
+## Native Query Components
+
+The following sections describe the aggregators and post-aggregators for use with [native Druid queries](../../querying/querying.md).
+
+### Aggregators
+
+The result of the aggregation is a histogram that is built by ingesting numeric values from
+the raw data, or from combining pre-aggregated histograms. The result is represented in
+JSON format where the keys are the bucket index and the values are the count of entries
+in that bucket.
+
+The buckets are defined as per the Spectator [PercentileBuckets](https://github.com/Netflix/spectator/blob/main/spectator-api/src/main/java/com/netflix/spectator/api/histogram/PercentileBuckets.java) specification.
+See [Histogram bucket boundaries](#histogram-bucket-boundaries) for the full list of bucket boundaries.
+```js
+ // The set of buckets is generated by using powers of 4 and incrementing by one-third of the
+ // previous power of 4 in between as long as the value is less than the next power of 4 minus
+ // the delta.
+ //
+ // Base: 1, 2, 3
+ //
+ // 4 (4^1), delta = 1 (~1/3 of 4)
+ // 5, 6, 7, ..., 14,
+ //
+ // 16 (4^2), delta = 5 (~1/3 of 16)
+ // 21, 26, 31, ..., 56,
+ //
+ // 64 (4^3), delta = 21 (~1/3 of 64)
+ // ...
+```
+
+There are multiple aggregator types included, all of which are based on the same
+underlying implementation. If you use the Atlas-Druid service, the different types
+signal the service on how to handle the resulting data from a query.
+
+* spectatorHistogramTimer signals that the histogram is representing
+a collection of timer values. It is recommended to normalize timer values to nanoseconds
+at, or prior to, ingestion. If queried via the Atlas-Druid service, it will
+normalize timers to second resolution at query time as a more natural unit of time
+for human consumption.
+* spectatorHistogram and spectatorHistogramDistribution are generic histograms that
+can be used to represent any measured value without units. No normalization is
+required or performed.
+
+### `spectatorHistogram` aggregator
+Alias: `spectatorHistogramDistribution`, `spectatorHistogramTimer`
+
+To aggregate at query time:
+```
+{
+ "type" : "spectatorHistogram",
+ "name" : <output_name>,
+ "fieldName" : <column_name>
+ }
+```
+
+| Property | Description | Required? |
+|-----------|--------------------------------------------------------------------------------------------------------------|-----------|
+| type | This String must be one of "spectatorHistogram", "spectatorHistogramTimer", "spectatorHistogramDistribution" | yes |
+| name | A String for the output (result) name of the aggregation. | yes |
+| fieldName | A String for the name of the input field containing raw numeric values or pre-aggregated histograms. | yes |
+
+### `longSum`, `doubleSum` and `floatSum` aggregators
+To get the population size (count of events contributing to the histogram):
+```
+{
+ "type" : "longSum",
+ "name" : <output_name>,
+ "fieldName" : <column_name_of_aggregated_histogram>
+ }
+```
+
+| Property | Description | Required? |
+|-----------|--------------------------------------------------------------------------------|-----------|
+| type | Must be "longSum", "doubleSum", or "floatSum". | yes |
+| name | A String for the output (result) name of the aggregation. | yes |
+| fieldName | A String for the name of the input field containing pre-aggregated histograms. | yes |
+
+### Post Aggregators
+
+#### Percentile (singular)
+This returns a single percentile calculation based on the distribution of the values in the aggregated histogram.
+
+```
+{
+ "type": "percentileSpectatorHistogram",
+ "name": <output name>,
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": <name of aggregated SpectatorHistogram>
+ },
+ "percentile": <decimal percentile, e.g. 50.0 for median>
+}
+```
+
+| Property | Description | Required? |
+|------------|-------------------------------------------------------------|-----------|
+| type | This String should always be "percentileSpectatorHistogram" | yes |
+| name | A String for the output (result) name of the calculation. | yes |
+| field | A field reference pointing to the aggregated histogram. | yes |
+| percentile | A single decimal percentile between 0.0 and 100.0 | yes |
+
+#### Percentiles (multiple)
+This returns an array of percentiles corresponding to those requested.
+
+```
+{
+ "type": "percentilesSpectatorHistogram",
+ "name": <output name>,
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": <name of aggregated SpectatorHistogram>
+ },
+ "percentiles": [25, 50, 75, 99.5]
+}
+```
+
+> It's more efficient to request multiple percentiles in a single query
+than to request individual percentiles in separate queries. This array-based
+helper is provided for convenience and has a marginal performance benefit over
+using the singular percentile post-aggregator multiple times within a query.
+The more expensive part of the query is the aggregation of the histogram.
+The post-aggregation calculations all happen on the same aggregated histogram.
+
+The results contain arrays matching the length and order of the requested
+array of percentiles.
+
+```
+"percentilesAdded": [
+ 0.5504911679884643, // 25th percentile
+ 4.013975155279504, // 50th percentile
+ 78.89518317503394, // 75th percentile
+ 8580.024999999994 // 99.5th percentile
+]
+```
+
+| Property | Description | Required? |
+|-------------|--------------------------------------------------------------|-----------|
+| type | This String should always be "percentilesSpectatorHistogram" | yes |
+| name | A String for the output (result) name of the calculation. | yes |
+| field | A field reference pointing to the aggregated histogram. | yes |
+| percentiles | Non-empty array of decimal percentiles between 0.0 and 100.0 | yes |
+
+#### Count Post-Aggregator
+
+This returns the total count of observations (data points) that were recorded in the histogram. This is useful for understanding the population size without needing a separate count metric.
+
+```json
+{
+ "type": "countSpectatorHistogram",
+ "name": "<output name>",
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": "<name of aggregated SpectatorHistogram>"
+ }
+}
+```
+
+| Property | Description | Required? |
+|----------|------------------------------------------------------------|-----------|
+| type | This String should always be "countSpectatorHistogram" | yes |
+| name | A String for the output (result) name of the calculation. | yes |
+| field | A field reference pointing to the aggregated histogram. | yes |
+
+## SQL Functions
+
+In addition to the native query aggregators and post-aggregators, this extension provides SQL functions for easier use in Druid SQL queries.
+
+### SPECTATOR_COUNT
+
+Returns the total count of observations (data points) in a Spectator histogram.
+
+**Syntax:**
+```sql
+SPECTATOR_COUNT(expr)
+```
+
+**Arguments:**
+- `expr`: A numeric column to aggregate into a histogram, or a pre-aggregated Spectator histogram column.
+
+**Returns:** BIGINT - the total number of observations or `NULL` if the histogram is null or empty.
+
+**Example:**
+```sql
+SELECT
+ SPECTATOR_COUNT(hist_added) AS total_count,
+ SPECTATOR_COUNT(added) AS total_count_from_raw
+FROM wikipedia
+```
+
+### SPECTATOR_PERCENTILE
+
+Computes approximate percentile values from a Spectator histogram. This function supports two forms: a single percentile or multiple percentiles.
+
+#### Single Percentile
+
+**Syntax:**
+```sql
+SPECTATOR_PERCENTILE(expr, percentile)
+```
+
+**Arguments:**
+- `expr`: A numeric column to aggregate into a histogram, or a pre-aggregated Spectator histogram column.
+- `percentile`: A decimal value between 0 and 100 representing the desired percentile.
+
+**Returns:** DOUBLE - the approximate value at the specified percentile or `NULL` if the histogram is null or empty.
+
+**Example:**
+```sql
+SELECT
+ SPECTATOR_PERCENTILE(hist_added, 50) AS median_added,
+ SPECTATOR_PERCENTILE(hist_added, 99) AS p99_added,
+ SPECTATOR_PERCENTILE(added, 95) AS p95_from_raw
+FROM wikipedia
+```
+
+#### Multiple Percentiles (Array)
+
+**Syntax:**
+```sql
+SPECTATOR_PERCENTILE(expr, ARRAY[p1, p2, ...])
+```
+
+**Arguments:**
+- `expr`: A numeric column to aggregate into a histogram, or a pre-aggregated Spectator histogram column.
+- `ARRAY[p1, p2, ...]`: An array of decimal values between 0 and 100 representing the desired percentiles.
+
+**Returns:** DOUBLE ARRAY - an array of approximate values at the specified percentiles, in the same order as requested or `NULL` if the histogram is null or empty.
+
+**Example:**
+```sql
+SELECT
+ SPECTATOR_PERCENTILE(hist_added, ARRAY[25, 50, 75, 99]) AS percentiles
+FROM wikipedia
+```
+
+This returns an array like `[200.5, 341.0, 468.5, 675.9]` representing the 25th, 50th, 75th, and 99th percentiles.
+
+Using the array form is more efficient than calling `SPECTATOR_PERCENTILE` multiple times for different percentiles, as the underlying histogram is only aggregated once.
+
+### Combined Example
+
+You can use both functions together in a single query. Multiple aggregations on the same column share the underlying histogram aggregator for efficiency:
+
+```sql
+SELECT
+ countryName,
+ SPECTATOR_COUNT(hist_added) AS observation_count,
+ SPECTATOR_PERCENTILE(hist_added, 50) AS median_added,
+ SPECTATOR_PERCENTILE(hist_added, 90) AS p90_added,
+ SPECTATOR_PERCENTILE(hist_added, 99) AS p99_added
+FROM wikipedia
+GROUP BY countryName
+ORDER BY observation_count DESC
+LIMIT 10
+```
+
+Or using the array form to get multiple percentiles in a single column:
+
+```sql
+SELECT
+ countryName,
+ SPECTATOR_COUNT(hist_added) AS observation_count,
+ SPECTATOR_PERCENTILE(hist_added, ARRAY[50, 90, 99]) AS percentiles
+FROM wikipedia
+GROUP BY countryName
+ORDER BY observation_count DESC
+LIMIT 10
+```
+
+## Examples
+
+### Example Ingestion Spec
+Example of ingesting the sample Wikipedia dataset with a histogram metric column:
+```json
+{
+ "type": "index_parallel",
+ "spec": {
+ "ioConfig": {
+ "type": "index_parallel",
+ "inputSource": {
+ "type": "http",
+ "uris": ["https://druid.apache.org/data/wikipedia.json.gz"]
+ },
+ "inputFormat": { "type": "json" }
+ },
+ "dataSchema": {
+ "granularitySpec": {
+ "segmentGranularity": "day",
+ "queryGranularity": "minute",
+ "rollup": true
+ },
+ "dataSource": "wikipedia",
+ "timestampSpec": { "column": "timestamp", "format": "iso" },
+ "dimensionsSpec": {
+ "dimensions": [
+ "isRobot",
+ "channel",
+ "flags",
+ "isUnpatrolled",
+ "page",
+ "diffUrl",
+ "comment",
+ "isNew",
+ "isMinor",
+ "isAnonymous",
+ "user",
+ "namespace",
+ "cityName",
+ "countryName",
+ "regionIsoCode",
+ "metroCode",
+ "countryIsoCode",
+ "regionName"
+ ]
+ },
+ "metricsSpec": [
+ { "name": "count", "type": "count" },
+ { "name": "sum_added", "type": "longSum", "fieldName": "added" },
+ {
+ "name": "hist_added",
+ "type": "spectatorHistogram",
+ "fieldName": "added"
+ }
+ ]
+ },
+ "tuningConfig": {
+ "type": "index_parallel",
+ "partitionsSpec": { "type": "hashed" },
+ "forceGuaranteedRollup": true
+ }
+ }
+}
+```
+
+### Example Query
+Example query using the sample Wikipedia dataset:
+```json
+{
+ "queryType": "timeseries",
+ "dataSource": {
+ "type": "table",
+ "name": "wikipedia"
+ },
+ "intervals": {
+ "type": "intervals",
+ "intervals": [
+ "0000-01-01/9999-12-31"
+ ]
+ },
+ "granularity": {
+ "type": "all"
+ },
+ "aggregations": [
+ {
+ "type": "spectatorHistogram",
+ "name": "histogram_added",
+ "fieldName": "added"
+ }
+ ],
+ "postAggregations": [
+ {
+ "type": "percentileSpectatorHistogram",
+ "name": "medianAdded",
+ "field": {
+ "type": "fieldAccess",
+ "fieldName": "histogram_added"
+ },
+ "percentile": "50.0"
+ }
+ ]
+}
+```
+Results in
+```json
+[
+ {
+ "result": {
+ "histogram_added": {
+ "0": 11096, "1": 632, "2": 297, "3": 187, "4": 322, "5": 161,
+ "6": 174, "7": 127, "8": 125, "9": 162, "10": 123, "11": 106,
+ "12": 95, "13": 104, "14": 95, "15": 588, "16": 540, "17": 690,
+ "18": 719, "19": 478, "20": 288, "21": 250, "22": 219, "23": 224,
+ "24": 737, "25": 424, "26": 343, "27": 266, "28": 232, "29": 217,
+ "30": 171, "31": 164, "32": 161, "33": 530, "34": 339, "35": 236,
+ "36": 181, "37": 152, "38": 113, "39": 128, "40": 80, "41": 75,
+ "42": 289, "43": 145, "44": 138, "45": 83, "46": 45, "47": 46,
+ "48": 64, "49": 65, "50": 71, "51": 421, "52": 525, "53": 59,
+ "54": 31, "55": 35, "56": 8, "57": 10, "58": 5, "59": 4, "60": 11,
+ "61": 10, "62": 5, "63": 2, "64": 2, "65": 1, "67": 1, "68": 1,
+ "69": 1, "70": 1, "71": 1, "78": 2
+ },
+ "medianAdded": 4.013975155279504
+ },
+ "timestamp": "2016-06-27T00:00:00.000Z"
+ }
+]
+```
+
+## Histogram bucket boundaries
+The following array lists the upper bounds of each bucket index. There are 276 buckets in total.
+The first bucket index is 0 and the last bucket index is 275.
+The bucket widths increase as the bucket index increases. This leads to a greater absolute error for larger values, but maintains a relative error of rough percentage across the number range.
+For example, the maximum error at value 10 is zero since the bucket width is 1 (the difference of `11-10`). For a value of 16,000,000,000, the bucket width is 1,431,655,768 (from `17179869184-15748213416`). This gives an error of up to ~8.9%, from `1,431,655,768/16,000,000,000*100`. In practice, the observed error of computed percentiles is in the range of (0.1%, 3%).
+```json
+[
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 21, 26, 31, 36, 41, 46,
+ 51, 56, 64, 85, 106, 127, 148, 169, 190, 211, 232, 256, 341, 426, 511, 596,
+ 681, 766, 851, 936, 1024, 1365, 1706, 2047, 2388, 2729, 3070, 3411, 3752,
+ 4096, 5461, 6826, 8191, 9556, 10921, 12286, 13651, 15016, 16384, 21845,
+ 27306, 32767, 38228, 43689, 49150, 54611, 60072, 65536, 87381, 109226,
+ 131071, 152916, 174761, 196606, 218451, 240296, 262144, 349525, 436906,
+ 524287, 611668, 699049, 786430, 873811, 961192, 1048576, 1398101, 1747626,
+ 2097151, 2446676, 2796201, 3145726, 3495251, 3844776, 4194304, 5592405,
+ 6990506, 8388607, 9786708, 11184809, 12582910, 13981011, 15379112, 16777216,
+ 22369621, 27962026, 33554431, 39146836, 44739241, 50331646, 55924051,
+ 61516456, 67108864, 89478485, 111848106, 134217727, 156587348, 178956969,
+ 201326590, 223696211, 246065832, 268435456, 357913941, 447392426, 536870911,
+ 626349396, 715827881, 805306366, 894784851, 984263336, 1073741824, 1431655765,
+ 1789569706, 2147483647, 2505397588, 2863311529, 3221225470, 3579139411,
+ 3937053352, 4294967296, 5726623061, 7158278826, 8589934591, 10021590356,
+ 11453246121, 12884901886, 14316557651, 15748213416, 17179869184, 22906492245,
+ 28633115306, 34359738367, 40086361428, 45812984489, 51539607550, 57266230611,
+ 62992853672, 68719476736, 91625968981, 114532461226, 137438953471,
+ 160345445716, 183251937961, 206158430206, 229064922451, 251971414696,
+ 274877906944, 366503875925, 458129844906, 549755813887, 641381782868,
+ 733007751849, 824633720830, 916259689811, 1007885658792, 1099511627776,
+ 1466015503701, 1832519379626, 2199023255551, 2565527131476, 2932031007401,
+ 3298534883326, 3665038759251, 4031542635176, 4398046511104, 5864062014805,
+ 7330077518506, 8796093022207, 10262108525908, 11728124029609, 13194139533310,
+ 14660155037011, 16126170540712, 17592186044416, 23456248059221,
+ 29320310074026, 35184372088831, 41048434103636, 46912496118441,
+ 52776558133246, 58640620148051, 64504682162856, 70368744177664,
+ 93824992236885, 117281240296106, 140737488355327, 164193736414548,
+ 187649984473769, 211106232532990, 234562480592211, 258018728651432,
+ 281474976710656, 375299968947541, 469124961184426, 562949953421311,
+ 656774945658196, 750599937895081, 844424930131966, 938249922368851,
+ 1032074914605736, 1125899906842624, 1501199875790165, 1876499844737706,
+ 2251799813685247, 2627099782632788, 3002399751580329, 3377699720527870,
+ 3752999689475411, 4128299658422952, 4503599627370496, 6004799503160661,
+ 7505999378950826, 9007199254740991, 10508399130531156, 12009599006321321,
+ 13510798882111486, 15011998757901651, 16513198633691816, 18014398509481984,
+ 24019198012642645, 30023997515803306, 36028797018963967, 42033596522124628,
+ 48038396025285289, 54043195528445950, 60047995031606611, 66052794534767272,
+ 72057594037927936, 96076792050570581, 120095990063213226, 144115188075855871,
+ 168134386088498516, 192153584101141161, 216172782113783806, 240191980126426451,
+ 264211178139069096, 288230376151711744, 384307168202282325, 480383960252852906,
+ 576460752303423487, 672537544353994068, 768614336404564649, 864691128455135230,
+ 960767920505705811, 1056844712556276392, 1152921504606846976, 1537228672809129301,
+ 1921535841011411626, 2305843009213693951, 2690150177415976276, 3074457345618258601,
+ 3458764513820540926, 3843071682022823251, 4227378850225105576, 9223372036854775807
+]
+```
diff --git a/docs/latest/development/extensions-contrib/sqlserver.md b/docs/38.0.0/development/extensions-contrib/sqlserver.md
similarity index 96%
copy from docs/latest/development/extensions-contrib/sqlserver.md
copy to docs/38.0.0/development/extensions-contrib/sqlserver.md
index 0f2e8de24..e48226749 100644
--- a/docs/latest/development/extensions-contrib/sqlserver.md
+++ b/docs/38.0.0/development/extensions-contrib/sqlserver.md
@@ -32,7 +32,7 @@ To use this Apache Druid extension, [include](../../configuration/extensions.md#
2. Create a druid database and user
Create the druid user
- - Microsoft SQL Server Management Studio - Security - Logins - New Login...
+ - Microsoft® SQL Server Management Studio - Security - Logins - New Login...
- Create a druid user, enter `diurd` when prompted for the password.
Create a druid database owned by the user we just created
diff --git a/docs/38.0.0/development/extensions-contrib/statsd.md b/docs/38.0.0/development/extensions-contrib/statsd.md
new file mode 100644
index 000000000..3e5713f58
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/statsd.md
@@ -0,0 +1,75 @@
+---
+id: statsd
+title: "StatsD Emitter"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `statsd-emitter` in the extensions load list.
+
+## Introduction
+
+This extension emits druid metrics to a StatsD server.
+(https://github.com/etsy/statsd)
+(https://github.com/armon/statsite)
+
+## Configuration
+
+All the configuration parameters for the StatsD emitter are under `druid.emitter.statsd`.
+
+|property|description|required?|default|
+|--------|-----------|---------|-------|
+|`druid.emitter.statsd.hostname`|The hostname of the StatsD server.|yes|none|
+|`druid.emitter.statsd.port`|The port of the StatsD server.|yes|none|
+|`druid.emitter.statsd.prefix`|Optional metric name prefix.|no|""|
+|`druid.emitter.statsd.separator`|Metric name separator|no|.|
+|`druid.emitter.statsd.includeHost`|Flag to include the hostname as part of the metric name.|no|false|
+|`druid.emitter.statsd.dimensionMapPath`|JSON file defining the StatsD type, and desired dimensions for every Druid metric|no|Default mapping provided. See below.|
+|`druid.emitter.statsd.blankHolder`|The blank character replacement as StatsD does not support path with blank character|no|"-"|
+|`druid.emitter.statsd.queueSize`|Maximum number of unprocessed messages in the message queue.|no|Default value of StatsD Client(4096)|
+|`druid.emitter.statsd.poolSize`|Network packet buffer pool size.|no|Default value of StatsD Client(512)|
+|`druid.emitter.statsd.processorWorkers`|The number of processor worker threads assembling buffers for submission.|no|Default value of StatsD Client(1)|
+|`druid.emitter.statsd.senderWorkers`| The number of sender worker threads submitting buffers to the socket.|no|Default value of StatsD Client(1)|
+|`druid.emitter.statsd.dogstatsd`|Flag to enable [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/) support. Causes dimensions to be included as tags, not as a part of the metric name. `convertRange` fields will be ignored.|no|false|
+|`druid.emitter.statsd.dogstatsdConstantTags`|If `druid.emitter.statsd.dogstatsd` is true, the tags in the JSON list of strings will be sent with every event.|no|[]|
+|`druid.emitter.statsd.dogstatsdServiceAsTag`|If `druid.emitter.statsd.dogstatsd` and `druid.emitter.statsd.dogstatsdServiceAsTag` are true, druid service (e.g. `druid/broker`, `druid/coordinator`, etc) is reported as a tag (e.g. `druid_service:druid/broker`) instead of being included in metric name (e.g. `druid.broker.query.time`) and `druid` is used as metric prefix (e.g. `druid.query.time`).|no|false|
+|`druid.emitter.statsd.dogstatsdEvents`|If `druid.emitter.statsd.dogstatsd` and `druid.emitter.statsd.dogstatsdEvents` are true, [Alert events](../../operations/alerts.md) are reported to DogStatsD.|no|false|
+
+### Druid to StatsD Event Converter
+
+Each metric sent to StatsD must specify a type, one of `[timer, counter, guage]`. StatsD Emitter expects this mapping to
+be provided as a JSON file. Additionally, this mapping specifies which dimensions should be included for each metric.
+StatsD expects that metric values be integers. Druid emits some metrics with values between the range 0 and 1. To accommodate these metrics they are converted
+into the range 0 to 100. This conversion can be enabled by setting the optional "convertRange" field true in the JSON mapping file.
+If the user does not specify their own JSON file, a default mapping is used. All
+metrics are expected to be mapped. Metrics which are not mapped will log an error.
+StatsD metric path is organized using the following schema:
+`<druid metric name> : { "dimensions" : <dimension list>, "type" : <StatsD type>, "convertRange" : true/false}`
+e.g.
+`query/time" : { "dimensions" : ["dataSource", "type"], "type" : "timer"}`
+
+For metrics which are emitted from multiple services with different dimensions, the metric name is prefixed with
+the service name.
+e.g.
+`"druid/coordinator-segment/count" : { "dimensions" : ["dataSource"], "type" : "gauge" },
+ "druid/historical-segment/count" : { "dimensions" : ["dataSource", "tier", "priority"], "type" : "gauge" }`
+
+For most use-cases, the default mapping is sufficient.
diff --git a/docs/latest/development/extensions-contrib/tdigestsketch-quantiles.md b/docs/38.0.0/development/extensions-contrib/tdigestsketch-quantiles.md
similarity index 89%
copy from docs/latest/development/extensions-contrib/tdigestsketch-quantiles.md
copy to docs/38.0.0/development/extensions-contrib/tdigestsketch-quantiles.md
index 101368445..65d33c9b9 100644
--- a/docs/latest/development/extensions-contrib/tdigestsketch-quantiles.md
+++ b/docs/38.0.0/development/extensions-contrib/tdigestsketch-quantiles.md
@@ -41,6 +41,14 @@ To use this aggregator, make sure you [include](../../configuration/extensions.m
druid.extensions.loadList=["druid-tdigestsketch"]
```
+### Configuration
+
+The following runtime property can be set in `runtime.properties`:
+
+|Property|Description|Default|
+|--------|-----------|-------|
+|`druid.tdigest.maxCompression`|Upper bound on the `compression` parameter accepted by the `tDigestSketch` aggregator and the `TDIGEST_GENERATE_SKETCH`/`TDIGEST_QUANTILE` SQL functions. When a query specifies a compression value exceeding this limit, the value is silently capped to `maxCompression`. Has no effect when unset.|None (no cap)|
+
### Aggregator
The result of the aggregation is a T-Digest sketch that is built ingesting numeric values from the raw data or from
@@ -80,7 +88,7 @@ Example:
|type|This String should always be "tDigestSketch"|yes|
|name|A String for the output (result) name of the calculation.|yes|
|fieldName|A String for the name of the input field containing raw numeric values or pre-generated T-Digest sketches.|yes|
-|compression|Parameter that determines the accuracy and size of the sketch. Higher compression means higher accuracy but more space to store sketches.|no, defaults to 100|
+|compression|Parameter that determines the accuracy and size of the sketch. Higher compression means higher accuracy but more space to store sketches. Capped by `druid.tdigest.maxCompression` when set.|no, defaults to 100|
### Post Aggregators
@@ -159,6 +167,7 @@ Once you load the T-Digest extension, you can use the following SQL functions.
Builds a T-Digest sketch on values produced by an expression.
Compression parameter (default value 100) determines the accuracy and size of the sketch.
Higher compression provides higher accuracy but requires more storage space.
+The compression value is capped by `druid.tdigest.maxCompression` when set.
* **Syntax**: `TDIGEST_GENERATE_SKETCH(expr, [compression])`
* **Default**: Empty Base64-encoded T-Digest sketch string
@@ -169,6 +178,7 @@ Higher compression provides higher accuracy but requires more storage space.
Builds a T-Digest sketch on values produced by an expression and returns the value for the quantile.
Compression parameter (default value 100) determines the accuracy and size of the sketch.
Higher compression provides higher accuracy but requires more storage space.
+The compression value is capped by `druid.tdigest.maxCompression` when set.
* **Syntax**: `TDIGEST_QUANTILE(expr, quantileFraction, [compression])`
* **Default**: `Double.NaN`
diff --git a/docs/38.0.0/development/extensions-contrib/thrift.md b/docs/38.0.0/development/extensions-contrib/thrift.md
new file mode 100644
index 000000000..0526ae567
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/thrift.md
@@ -0,0 +1,119 @@
+---
+id: thrift
+title: "Thrift"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-thrift-extensions` in the extensions load list.
+
+This extension enables Druid to ingest Thrift-encoded data from streaming sources such as Kafka and Kinesis.
+
+You may want to use another version of thrift, change the dependency in pom and compile yourself.
+
+## Thrift input format
+
+Thrift-encoded data for streaming ingestion (Kafka, Kinesis) can be ingested using the Thrift [input format](../../ingestion/data-formats.md#input-format). It supports `flattenSpec` for extracting fields from nested Thrift structs using JSONPath expressions.
+
+| Field | Type | Description | Required |
+|-------|------|-------------|----------|
+| type | String | Must be `thrift` | yes |
+| thriftClass | String | Fully qualified class name of the Thrift-generated `TBase` class to deserialize into. | yes |
+| thriftJar | String | Path to a JAR file containing the Thrift class. If not provided, the class is looked up from the classpath. | no |
+| flattenSpec | JSON Object | Specifies flattening of nested Thrift structs. See [Flattening nested data](../../ingestion/data-formats.md#flattenspec) for details. | no |
+
+### Example: Kafka ingestion
+
+Consider the following Thrift schema definition:
+
+```
+namespace java com.example.druid
+
+struct Author {
+ 1: string firstName;
+ 2: string lastName;
+}
+
+struct Book {
+ 1: string date;
+ 2: double price;
+ 3: string title;
+ 4: Author author;
+}
+```
+
+Compile it to produce `com.example.druid.Book` (and `com.example.druid.Author`) and make the resulting JAR available on the classpath of your Druid processes, or reference it via `thriftJar`.
+
+The following Kafka supervisor spec ingests compact-encoded `Book` messages, using a `flattenSpec` to extract the nested `author.lastName` field:
+
+```json
+{
+ "type": "kafka",
+ "spec": {
+ "dataSchema": {
+ "dataSource": "books",
+ "timestampSpec": {
+ "column": "date",
+ "format": "auto"
+ },
+ "dimensionsSpec": {
+ "dimensions": [
+ "title",
+ "lastName"
+ ]
+ },
+ "granularitySpec": {
+ "type": "uniform",
+ "segmentGranularity": "DAY",
+ "queryGranularity": "NONE"
+ }
+ },
+ "tuningConfig": {
+ "type": "kafka"
+ },
+ "ioConfig": {
+ "type": "kafka",
+ "consumerProperties": {
+ "bootstrap.servers": "localhost:9092"
+ },
+ "topic": "books",
+ "inputFormat": {
+ "type": "thrift",
+ "thriftClass": "com.example.druid.Book",
+ "flattenSpec": {
+ "useFieldDiscovery": true,
+ "fields": [
+ {
+ "type": "path",
+ "name": "lastName",
+ "expr": "$.author.lastName"
+ }
+ ]
+ }
+ },
+ "taskCount": 1,
+ "replicas": 1,
+ "taskDuration": "PT1H"
+ }
+ }
+}
+```
+
diff --git a/docs/38.0.0/development/extensions-contrib/time-min-max.md b/docs/38.0.0/development/extensions-contrib/time-min-max.md
new file mode 100644
index 000000000..f83667bae
--- /dev/null
+++ b/docs/38.0.0/development/extensions-contrib/time-min-max.md
@@ -0,0 +1,104 @@
+---
+id: time-min-max
+title: "Timestamp Min/Max aggregators"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-time-min-max` in the extensions load list.
+
+These aggregators enable more precise calculation of min and max time of given events than `__time` column whose granularity is sparse, the same as query granularity.
+To use this feature, a "timeMin" or "timeMax" aggregator must be included at indexing time.
+They can apply to any columns that can be converted to timestamp, which include Long, DateTime, Timestamp, and String types.
+
+For example, when a data set consists of timestamp, dimension, and metric value like followings.
+
+```
+2015-07-28T01:00:00.000Z A 1
+2015-07-28T02:00:00.000Z A 1
+2015-07-28T03:00:00.000Z A 1
+2015-07-28T04:00:00.000Z B 1
+2015-07-28T05:00:00.000Z A 1
+2015-07-28T06:00:00.000Z B 1
+2015-07-29T01:00:00.000Z C 1
+2015-07-29T02:00:00.000Z C 1
+2015-07-29T03:00:00.000Z A 1
+2015-07-29T04:00:00.000Z A 1
+```
+
+At ingestion time, timeMin and timeMax aggregator can be included as other aggregators.
+
+```json
+{
+ "type": "timeMin",
+ "name": "tmin",
+ "fieldName": "<field_name, typically column specified in timestamp spec>"
+}
+```
+
+```json
+{
+ "type": "timeMax",
+ "name": "tmax",
+ "fieldName": "<field_name, typically column specified in timestamp spec>"
+}
+```
+
+`name` is output name of aggregator and can be any string. `fieldName` is typically column specified in timestamp spec but can be any column that can be converted to timestamp.
+
+To query for results, the same aggregators "timeMin" and "timeMax" is used.
+
+```json
+{
+ "queryType": "groupBy",
+ "dataSource": "timeMinMax",
+ "granularity": "DAY",
+ "dimensions": ["product"],
+ "aggregations": [
+ {
+ "type": "count",
+ "name": "count"
+ },
+ {
+ "type": "timeMin",
+ "name": "<output_name of timeMin>",
+ "fieldName": "tmin"
+ },
+ {
+ "type": "timeMax",
+ "name": "<output_name of timeMax>",
+ "fieldName": "tmax"
+ }
+ ],
+ "intervals": [
+ "2010-01-01T00:00:00.000Z/2020-01-01T00:00:00.000Z"
+ ]
+}
+```
+
+Then, result has min and max of timestamp, which is finer than query granularity.
+
+```
+2015-07-28T00:00:00.000Z A 4 2015-07-28T01:00:00.000Z 2015-07-28T05:00:00.000Z
+2015-07-28T00:00:00.000Z B 2 2015-07-28T04:00:00.000Z 2015-07-28T06:00:00.000Z
+2015-07-29T00:00:00.000Z A 2 2015-07-29T03:00:00.000Z 2015-07-29T04:00:00.000Z
+2015-07-29T00:00:00.000Z C 2 2015-07-29T01:00:00.000Z 2015-07-29T02:00:00.000Z
+```
diff --git a/docs/latest/development/extensions-core/approximate-histograms.md b/docs/38.0.0/development/extensions-core/approximate-histograms.md
similarity index 98%
copy from docs/latest/development/extensions-core/approximate-histograms.md
copy to docs/38.0.0/development/extensions-core/approximate-histograms.md
index 240d87a5a..a7a03a680 100644
--- a/docs/latest/development/extensions-core/approximate-histograms.md
+++ b/docs/38.0.0/development/extensions-core/approximate-histograms.md
@@ -27,7 +27,7 @@ title: "Approximate Histogram aggregators"
The Approximate Histogram aggregator is deprecated. Use [DataSketches Quantiles](../extensions-core/datasketches-quantiles.md) instead as it provides a superior distribution-independent algorithm with formal error guarantees.
:::
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-histogram` in the extensions load list.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-histogram` in the extensions load list.
The `druid-histogram` extension provides an approximate histogram aggregator and a fixed buckets histogram aggregator.
diff --git a/docs/latest/development/extensions-core/avro.md b/docs/38.0.0/development/extensions-core/avro.md
similarity index 96%
copy from docs/latest/development/extensions-core/avro.md
copy to docs/38.0.0/development/extensions-core/avro.md
index c51c85043..1885426f3 100644
--- a/docs/latest/development/extensions-core/avro.md
+++ b/docs/38.0.0/development/extensions-core/avro.md
@@ -22,7 +22,7 @@ title: "Apache Avro"
~ under the License.
-->
-This Apache Druid extension enables Druid to ingest and parse the Apache Avro data format as follows:
+This Apache® Druid extension enables Druid to ingest and parse the Apache Avro data format as follows:
- [Avro stream input format](../../ingestion/data-formats.md#avro-stream) for Kafka and Kinesis.
- [Avro OCF input format](../../ingestion/data-formats.md#avro-ocf) for native batch ingestion.
diff --git a/docs/latest/development/extensions-core/azure.md b/docs/38.0.0/development/extensions-core/azure.md
similarity index 96%
copy from docs/latest/development/extensions-core/azure.md
copy to docs/38.0.0/development/extensions-core/azure.md
index d6310e32c..b76148c7e 100644
--- a/docs/latest/development/extensions-core/azure.md
+++ b/docs/38.0.0/development/extensions-core/azure.md
@@ -32,7 +32,7 @@ This extension allows you to do the following:
:::info
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-azure-extensions` in the extensions load list.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-azure-extensions` in the extensions load list.
:::
diff --git a/docs/latest/development/extensions-core/bloom-filter.md b/docs/38.0.0/development/extensions-core/bloom-filter.md
similarity index 99%
copy from docs/latest/development/extensions-core/bloom-filter.md
copy to docs/38.0.0/development/extensions-core/bloom-filter.md
index c0167e446..3255101e6 100644
--- a/docs/latest/development/extensions-core/bloom-filter.md
+++ b/docs/38.0.0/development/extensions-core/bloom-filter.md
@@ -23,7 +23,7 @@ title: "Bloom Filter"
-->
-To use the Apache Druid® Bloom filter extension, include `druid-bloom-filter` in the extensions load list. See [Loading extensions](../../configuration/extensions.md#loading-extensions) for more information.
+To use the Apache® Druid Bloom filter extension, include `druid-bloom-filter` in the extensions load list. See [Loading extensions](../../configuration/extensions.md#loading-extensions) for more information.
This extension adds the abilities to construct Bloom filters from query results and to filter query results by testing
against a Bloom filter. A Bloom filter is a probabilistic data structure to check for set membership. A Bloom
diff --git a/docs/38.0.0/development/extensions-core/catalog.md b/docs/38.0.0/development/extensions-core/catalog.md
new file mode 100644
index 000000000..1825d56ef
--- /dev/null
+++ b/docs/38.0.0/development/extensions-core/catalog.md
@@ -0,0 +1,456 @@
+---
+id: catalog
+title: Catalog
+---
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+Consider this an [EXPERIMENTAL](../experimental.md) feature mostly because it has not been tested yet on a wide variety of long running Druid clusters.
+
+This extension allows users to configure, update, retrieve, and manage metadata stored in Druid's catalog. At present, only metadata about tables is stored in the catalog. This extension only supports MSQ based ingestion.
+
+## Configuration
+
+To use this extension please make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-catalog` in the extensions load list.
+
+# Catalog Metadata
+
+## Tables
+
+A user may define a table with a defined set of column names, and respective data types, along with other properties. When
+ingesting data into a table defined in the catalog, the DML query is validated against the definition of the table
+as defined in the catalog. This allows the user to omit the table's properties that are found in its definition,
+allowing queries to be more concise, and simpler to write. This also allows the user to ensure that the type of data being
+written into a defined column of the table is consistent with that columns definition, minimizing errors where unexpected
+data is written into a particular column of the table.
+
+### API Objects
+
+#### TableSpec
+
+A tableSpec defines a table
+
+| Property | Type | Description | Required | Default |
+|--------------|---------------------------------|---------------------------------------------------------------------------|----------|---------|
+| `type` | String | the type of table. The only value supported at this time is `datasource` | yes | null |
+| `properties` | Map<String, Object> | the table's defined properties. see [table properties](#table-properties) | no | null |
+| `columns` | List<[ColumnSpec](#columnspec)> | the table's defined columns | no | null |
+
+#### Table Properties
+
+| PropertyKeyName | PropertyValueType | Description | Required | Default |
+|----------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|
+| `segmentGranularity` | String | determines how time-based partitioning is done. See [Partitioning by time](../../multi-stage-query/concepts.md#partitioning-by-time). Can specify any of the values as permitted for [PARTITIONED BY](../../multi-stage-query/reference.md#partitioned-by). This property value may be overridden at query time, by specifying the PARTITIONED BY clause. | no | null |
+| `sealed` | boolean | require all columns in the table schema to be fully declared before data is ingested. Setting this to true will cause failure when DML queries attempt to add undefined columns to the table. | no | false |
+
+#### ColumnSpec
+
+| Property | Type | Description | Required | Default |
+|--------------|---------------------|------------------------------------------------------------------------------------------------------------------------|----------|---------|
+| `name` | String | The name of the column | yes | null |
+| `dataType` | String | The type of the column. Can be any column data type that is available to Druid. Depends on what extensions are loaded. | no | null |
+| `properties` | Map<String, Object\> | the column's defined properties. Non properties defined at this time. | no | null |
+
+### APIs
+
+#### Create or update a table
+
+Update or create a new table containing the given table specification.
+
+##### URL
+
+`POST` `/druid/coordinator/v1/catalog/schemas/{schema}/tables/{name}`
+
+##### Request body
+
+The request object for this request is a [TableSpec](#tablespec)
+
+##### Query parameters
+
+The endpoint supports a set of optional query parameters to enforce optimistic locking, and to specify that a request
+is meant to update a table rather than create a new one. In the default case, with no query parameters set, this request
+will return an error if a table of the same name already exists in the schema specified.
+
+| Parameter | Type | Description |
+|-------------|---------|-------------------------------------------------------------------------------------------------------------------------------|
+| `version` | Long | the expected version of an existing table. The version must match. If not (or if the table does not exist), returns an error. |
+| `overwrite` | boolean | if true, then overwrites any existing table. Otherwise, the operation fails if the table already exists. |
+
+##### Responses
+
+<Tabs>
+
+<TabItem value="1" label="200 SUCCESS">
+
+*Successfully submitted table spec. Returns an object that includes the version of the table created or updated:*
+
+```json
+{
+ "version": 12345687
+}
+```
+
+</TabItem>
+<TabItem value="2" label="400 BAD REQUEST">
+
+*Error thrown due to bad request. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+</TabItem>
+<TabItem value="3" label="500 INTERNAL SERVER ERROR">
+
+
+*Error thrown due to unexpected conditions. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+
+</TabItem>
+</Tabs>
+
+##### Sample request
+
+The following example shows how to create a sealed table with several defined columns, and a defined segment granularity of `"P1D"`
+
+```shell
+curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/catalog/schemas/druid/tables/test_table" \
+-X 'POST' \
+--header 'Content-Type: application/json' \
+--data '{
+ "type": "datasource",
+ "columns": [
+ {
+ "name": "__time",
+ "dataType": "long"
+ },
+ {
+ "name": "double_col",
+ "dataType": "double"
+ },
+ {
+ "name": "float_col",
+ "dataType": "float"
+ },
+ {
+ "name": "long_col",
+ "dataType": "long"
+ },
+ {
+ "name": "string_col",
+ "dataType": "string"
+ }
+ ],
+ "properties": {
+ "segmentGranularity": "P1D",
+ "sealed": true
+ }
+}'
+```
+
+##### Sample response
+
+```json
+{
+ "version": 1730965026295
+}
+```
+
+#### Retrieve a table
+
+Retrieve a table
+
+##### URL
+
+`GET` `/druid/coordinator/v1/catalog/schemas/{schema}/tables/{name}`
+
+##### Responses
+
+<Tabs>
+
+<TabItem value="1" label="200 SUCCESS">
+
+*Successfully retrieved corresponding table's [TableSpec](#tablespec)*
+
+</TabItem>
+<TabItem value="2" label="400 BAD REQUEST">
+
+*Error thrown due to bad request. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+</TabItem>
+<TabItem value="3" label="500 INTERNAL SERVER ERROR">
+
+*Error thrown due to unexpected conditions. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+
+</TabItem>
+</Tabs>
+
+##### Sample request
+
+The following example shows how to retrieve a table named `test_table` in schema `druid`:
+
+```shell
+curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/catalog/schemas/druid/tables/test_table"
+```
+
+##### Sample response
+
+<details>
+ <summary>View the response</summary>
+
+```json
+{
+ "id": {
+ "schema": "druid",
+ "name": "test_table"
+ },
+ "creationTime": 1730965026295,
+ "updateTime": 1730965026295,
+ "state": "ACTIVE",
+ "spec": {
+ "type": "datasource",
+ "properties": {
+ "segmentGranularity": "P1D",
+ "sealed": true
+ },
+ "columns": [
+ {
+ "name": "__time",
+ "dataType": "long"
+ },
+ {
+ "name": "double_col",
+ "dataType": "double"
+ },
+ {
+ "name": "float_col",
+ "dataType": "float"
+ },
+ {
+ "name": "long_col",
+ "dataType": "long"
+ },
+ {
+ "name": "string_col",
+ "dataType": "string"
+ }
+ ]
+ }
+}
+```
+</details>
+
+#### Delete a table
+
+Delete a table
+
+##### URL
+
+`DELETE` `/druid/coordinator/v1/catalog/schemas/{schema}/tables/{name}`
+
+##### Responses
+
+<Tabs>
+
+<TabItem value="1" label="200 SUCCESS">
+
+*No response body*
+
+</TabItem>
+<TabItem value="2" label="400 BAD REQUEST">
+
+*Error thrown due to bad request. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+</TabItem>
+<TabItem value="3" label="500 INTERNAL SERVER ERROR">
+
+*Error thrown due to unexpected conditions. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+
+</TabItem>
+</Tabs>
+
+##### Sample request
+
+The following example shows how to delete the a table named `test_table` in schema `druid`
+
+```shell
+curl -X 'DELETE' "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/catalog/schemas/druid/tables/test_table"
+```
+
+##### Sample response
+
+No response body
+
+#### Retrieve list of schema names
+
+retrieve list of schema names
+
+##### URL
+
+`GET` `/druid/coordinator/v1/catalog/schemas`
+
+##### Responses
+
+<Tabs>
+
+<TabItem value="1" label="200 SUCCESS">
+
+*Successfully retrieved list of schema names*
+
+</TabItem>
+<TabItem value="2" label="400 BAD REQUEST">
+
+*Error thrown due to bad request. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+</TabItem>
+<TabItem value="3" label="500 INTERNAL SERVER ERROR">
+
+*Error thrown due to unexpected conditions. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+
+</TabItem>
+</Tabs>
+
+##### Sample request
+
+The following example shows how to retrieve the list of schema names.
+
+```shell
+curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/catalog/schemas"
+```
+
+##### Sample response
+
+```json
+[
+ "INFORMATION_SCHEMA",
+ "druid",
+ "ext",
+ "lookups",
+ "sys",
+ "view"
+]
+```
+
+#### Retrieve list of table names in schema
+
+Retrieve a list of table names in the schema.
+
+##### URL
+
+`GET` `/druid/coordinator/v1/catalog/schemas/{schema}/tables`
+
+##### Responses
+
+<Tabs>
+
+<TabItem value="1" label="200 SUCCESS">
+
+*Successfully retrieved list of table names belonging to schema*
+
+</TabItem>
+<TabItem value="2" label="400 BAD REQUEST">
+
+*Error thrown due to bad request. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+</TabItem>
+<TabItem value="3" label="500 INTERNAL SERVER ERROR">
+
+*Error thrown due to unexpected conditions. Returns a JSON object detailing the error with the following format:*
+
+```json
+{
+ "error": "A well-defined error code.",
+ "errorMessage": "A message with additional details about the error."
+}
+```
+
+</TabItem>
+</Tabs>
+
+##### Sample request
+
+The following example shows how to retrieve all of the table names of tables belonging to the `druid` schema.
+
+```shell
+curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/catalog/schemas/druid/tables"
+```
+
+##### Sample response
+
+```json
+[
+ "test_table"
+]
+```
diff --git a/docs/latest/development/extensions-core/datasketches-extension.md b/docs/38.0.0/development/extensions-core/datasketches-extension.md
similarity index 85%
copy from docs/latest/development/extensions-core/datasketches-extension.md
copy to docs/38.0.0/development/extensions-core/datasketches-extension.md
index 00c955dc9..17f903da8 100644
--- a/docs/latest/development/extensions-core/datasketches-extension.md
+++ b/docs/38.0.0/development/extensions-core/datasketches-extension.md
@@ -23,7 +23,7 @@ title: "DataSketches extension"
-->
-Apache Druid aggregators based on [Apache DataSketches](https://datasketches.apache.org/) library. Sketches are data structures implementing approximate streaming mergeable algorithms. Sketches can be ingested from the outside of Druid or built from raw data at ingestion time. Sketches can be stored in Druid segments as additive metrics.
+Apache® Druid aggregators based on [Apache DataSketches](https://datasketches.apache.org/) library. Sketches are data structures implementing approximate streaming mergeable algorithms. Sketches can be ingested from the outside of Druid or built from raw data at ingestion time. Sketches can be stored in Druid segments as additive metrics.
To use the datasketches aggregators, make sure you [include](../../configuration/extensions.md#loading-extensions) the extension in your config file:
diff --git a/docs/latest/development/extensions-core/datasketches-hll.md b/docs/38.0.0/development/extensions-core/datasketches-hll.md
similarity index 94%
copy from docs/latest/development/extensions-core/datasketches-hll.md
copy to docs/38.0.0/development/extensions-core/datasketches-hll.md
index 4e2b369e5..becb61b55 100644
--- a/docs/latest/development/extensions-core/datasketches-hll.md
+++ b/docs/38.0.0/development/extensions-core/datasketches-hll.md
@@ -23,7 +23,7 @@ title: "DataSketches HLL Sketch module"
-->
-This module provides Apache Druid aggregators for distinct counting based on HLL sketch from [Apache DataSketches](https://datasketches.apache.org/) library. At ingestion time, this aggregator creates the HLL sketch objects to store in Druid segments. By default, Druid reads and merges sketches at query time. The default result is
+This module provides Apache® Druid aggregators for distinct counting based on HLL sketch from [Apache DataSketches](https://datasketches.apache.org/) library. At ingestion time, this aggregator creates the HLL sketch objects to store in Druid segments. By default, Druid reads and merges sketches at query time. The default result is
the estimate of the number of distinct values presented to the sketch. You can also use post aggregators to produce a union of sketch columns in the same row.
You can use the HLL sketch aggregator on any column to estimate its cardinality.
diff --git a/docs/latest/development/extensions-core/datasketches-kll.md b/docs/38.0.0/development/extensions-core/datasketches-kll.md
similarity index 88%
copy from docs/latest/development/extensions-core/datasketches-kll.md
copy to docs/38.0.0/development/extensions-core/datasketches-kll.md
index b8e372dc9..2f0b63cae 100644
--- a/docs/latest/development/extensions-core/datasketches-kll.md
+++ b/docs/38.0.0/development/extensions-core/datasketches-kll.md
@@ -23,7 +23,7 @@ title: "DataSketches KLL Sketch module"
-->
-This module provides Apache Druid aggregators based on numeric quantiles KllFloatsSketch and KllDoublesSketch from [Apache DataSketches](https://datasketches.apache.org/) library. KLL quantiles sketch is a mergeable streaming algorithm to estimate the distribution of values, and approximately answer queries about the rank of a value, probability mass function of the distribution (PMF) or histogram, cumulative distribution function (CDF), and quantiles (median, min, max, 95th percentile a [...]
+This module provides Apache® Druid aggregators based on numeric quantiles KllFloatsSketch and KllDoublesSketch from [Apache DataSketches](https://datasketches.apache.org/) library. KLL quantiles sketch is a mergeable streaming algorithm to estimate the distribution of values, and approximately answer queries about the rank of a value, probability mass function of the distribution (PMF) or histogram, cumulative distribution function (CDF), and quantiles (median, min, max, 95th pe [...]
There are three major modes of operation:
diff --git a/docs/latest/development/extensions-core/datasketches-quantiles.md b/docs/38.0.0/development/extensions-core/datasketches-quantiles.md
similarity index 91%
copy from docs/latest/development/extensions-core/datasketches-quantiles.md
copy to docs/38.0.0/development/extensions-core/datasketches-quantiles.md
index e6845d92d..a2e73229e 100644
--- a/docs/latest/development/extensions-core/datasketches-quantiles.md
+++ b/docs/38.0.0/development/extensions-core/datasketches-quantiles.md
@@ -23,7 +23,7 @@ title: "DataSketches Quantiles Sketch module"
-->
-This module provides Apache Druid aggregators based on numeric quantiles DoublesSketch from [Apache DataSketches](https://datasketches.apache.org/) library. Quantiles sketch is a mergeable streaming algorithm to estimate the distribution of values, and approximately answer queries about the rank of a value, probability mass function of the distribution (PMF) or histogram, cumulative distribution function (CDF), and quantiles (median, min, max, 95th percentile and such). See [Quantiles Sk [...]
+This module provides Apache® Druid aggregators based on numeric quantiles DoublesSketch from [Apache DataSketches](https://datasketches.apache.org/) library. Quantiles sketch is a mergeable streaming algorithm to estimate the distribution of values, and approximately answer queries about the rank of a value, probability mass function of the distribution (PMF) or histogram, cumulative distribution function (CDF), and quantiles (median, min, max, 95th percentile and such). See [Qu [...]
There are three major modes of operation:
diff --git a/docs/latest/development/extensions-core/datasketches-theta.md b/docs/38.0.0/development/extensions-core/datasketches-theta.md
similarity index 98%
copy from docs/latest/development/extensions-core/datasketches-theta.md
copy to docs/38.0.0/development/extensions-core/datasketches-theta.md
index 33bdbe9d3..13776856d 100644
--- a/docs/latest/development/extensions-core/datasketches-theta.md
+++ b/docs/38.0.0/development/extensions-core/datasketches-theta.md
@@ -23,7 +23,7 @@ title: "DataSketches Theta Sketch module"
-->
-This module provides Apache Druid aggregators based on Theta sketch from [Apache DataSketches](https://datasketches.apache.org/) library.
+This module provides Apache® Druid aggregators based on Theta sketch from [Apache DataSketches](https://datasketches.apache.org/) library.
Sketch algorithms are approximate. For more information, see [Accuracy](https://datasketches.apache.org/docs/Theta/ThetaAccuracy.html) in the DataSketches documentation.
At ingestion time, the Theta sketch aggregator creates Theta sketch objects which are stored in Druid segments. Logically speaking, a Theta sketch object can be thought of as a Set data structure. At query time, sketches are read and aggregated (set unioned) together. In the end, by default, you receive the estimate of the number of unique entries in the sketch object. You can use post aggregators to do union, intersection or difference on sketch columns in the same row.
diff --git a/docs/latest/development/extensions-core/datasketches-tuple.md b/docs/38.0.0/development/extensions-core/datasketches-tuple.md
similarity index 96%
copy from docs/latest/development/extensions-core/datasketches-tuple.md
copy to docs/38.0.0/development/extensions-core/datasketches-tuple.md
index 1dcf76c0b..ea4f27e92 100644
--- a/docs/latest/development/extensions-core/datasketches-tuple.md
+++ b/docs/38.0.0/development/extensions-core/datasketches-tuple.md
@@ -23,7 +23,7 @@ title: "DataSketches Tuple Sketch module"
-->
-This module provides Apache Druid aggregators based on Tuple sketch from [Apache DataSketches](https://datasketches.apache.org/) library. ArrayOfDoublesSketch sketches extend the functionality of the count-distinct Theta sketches by adding arrays of double values associated with unique keys.
+This module provides Apache® Druid aggregators based on Tuple sketch from [Apache DataSketches](https://datasketches.apache.org/) library. ArrayOfDoublesSketch sketches extend the functionality of the count-distinct Theta sketches by adding arrays of double values associated with unique keys.
To use this aggregator, make sure you [include](../../configuration/extensions.md#loading-extensions) the extension in your config file:
diff --git a/docs/38.0.0/development/extensions-core/druid-aws-rds.md b/docs/38.0.0/development/extensions-core/druid-aws-rds.md
new file mode 100644
index 000000000..48c4ba174
--- /dev/null
+++ b/docs/38.0.0/development/extensions-core/druid-aws-rds.md
@@ -0,0 +1,38 @@
+---
+id: druid-aws-rds
+title: "Druid AWS RDS Module"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+[AWS RDS](https://aws.amazon.com/rds/) is a managed service to operate relation databases such as PostgreSQL, Mysql etc. These databases could be accessed using static db password mechanism or via [AWS IAM](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) temporary tokens. This module provides AWS RDS token [password provider](../../operations/password-provider.md) implementation to be used with [mysql-metadata-store](mysql.md) or [postgresql-metadata-s [...]
+
+```json
+{ "type": "aws-rds-token", "user": "USER", "host": "HOST", "port": PORT, "region": "AWS_REGION" }
+```
+
+Before using this password provider, please make sure that you have connected all dots for db user to connect using token.
+See [AWS Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html).
+
+To use this extension, make sure you [include](../../configuration/extensions.md#loading-extensions) it in your config file along with other extensions e.g.
+
+```
+druid.extensions.loadList=["druid-aws-rds-extensions", "postgresql-metadata-storage", ...]
+```
diff --git a/docs/latest/development/extensions-core/druid-basic-security.md b/docs/38.0.0/development/extensions-core/druid-basic-security.md
similarity index 99%
copy from docs/latest/development/extensions-core/druid-basic-security.md
copy to docs/38.0.0/development/extensions-core/druid-basic-security.md
index 80df2d18a..ab011669c 100644
--- a/docs/latest/development/extensions-core/druid-basic-security.md
+++ b/docs/38.0.0/development/extensions-core/druid-basic-security.md
@@ -23,7 +23,7 @@ title: "Basic Security"
-->
-The Basic Security extension for Apache Druid adds:
+The Basic Security extension for Apache® Druid adds:
- an Authenticator which supports [HTTP Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) using the Druid metadata store or LDAP as its credentials store.
- an Escalator which determines the authentication scheme for internal Druid processes.
diff --git a/docs/latest/development/extensions-core/druid-kerberos.md b/docs/38.0.0/development/extensions-core/druid-kerberos.md
similarity index 98%
copy from docs/latest/development/extensions-core/druid-kerberos.md
copy to docs/38.0.0/development/extensions-core/druid-kerberos.md
index 8858e5354..082beb105 100644
--- a/docs/latest/development/extensions-core/druid-kerberos.md
+++ b/docs/38.0.0/development/extensions-core/druid-kerberos.md
@@ -23,7 +23,7 @@ title: "Kerberos"
-->
-Apache Druid Extension to enable Authentication for Druid Processes using Kerberos.
+Apache® Druid Extension to enable Authentication for Druid Processes using Kerberos.
This extension adds an Authenticator which is used to protect HTTP Endpoints using the simple and protected GSSAPI negotiation mechanism [SPNEGO](https://en.wikipedia.org/wiki/SPNEGO).
Make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-kerberos` in the extensions load list.
diff --git a/docs/latest/development/extensions-core/druid-lookups.md b/docs/38.0.0/development/extensions-core/druid-lookups.md
similarity index 98%
copy from docs/latest/development/extensions-core/druid-lookups.md
copy to docs/38.0.0/development/extensions-core/druid-lookups.md
index e3514a0d0..39d09cffd 100644
--- a/docs/latest/development/extensions-core/druid-lookups.md
+++ b/docs/38.0.0/development/extensions-core/druid-lookups.md
@@ -23,7 +23,7 @@ title: "Cached Lookup Module"
-->
## Description
-This Apache Druid module provides a per-lookup caching mechanism for JDBC data sources.
+This Apache® Druid module provides a per-lookup caching mechanism for JDBC data sources.
The main goal of this cache is to speed up the access to a high latency lookup sources and to provide a caching isolation for every lookup source.
Thus user can define various caching strategies or and implementation per lookup, even if the source is the same.
This module can be used side to side with other lookup module like the global cached lookup module.
diff --git a/docs/latest/development/extensions-core/druid-pac4j.md b/docs/38.0.0/development/extensions-core/druid-pac4j.md
similarity index 83%
copy from docs/latest/development/extensions-core/druid-pac4j.md
copy to docs/38.0.0/development/extensions-core/druid-pac4j.md
index 243350cc5..a86da7cb0 100644
--- a/docs/latest/development/extensions-core/druid-pac4j.md
+++ b/docs/38.0.0/development/extensions-core/druid-pac4j.md
@@ -23,7 +23,7 @@ title: "Druid pac4j based Security extension"
-->
-Apache Druid Extension to enable [OpenID Connect](https://openid.net/connect/) based Authentication for Druid Processes using [pac4j](https://github.com/pac4j/pac4j) as the underlying client library.
+Apache® Druid Extension to enable [OpenID Connect](https://openid.net/connect/) based Authentication for Druid Processes using [pac4j](https://github.com/pac4j/pac4j) as the underlying client library.
This can be used with any authentication server that supports same e.g. [Okta](https://developer.okta.com/).
The pac4j authenticator should only be used at the router node to enable a group of users in existing authentication server to interact with Druid cluster, using the [web console](../../operations/web-console.md).
@@ -55,6 +55,7 @@ druid.auth.authenticator.jwt.type=jwt
|`druid.auth.pac4j.oidc.discoveryURI`|discovery URI for fetching OP metadata [see this](http://openid.net/specs/openid-connect-discovery-1_0.html).|none|Yes|
|`druid.auth.pac4j.oidc.oidcClaim`|[claim](https://openid.net/specs/openid-connect-core-1_0.html#Claims) that will be extracted from the ID Token after validation.|name|No|
|`druid.auth.pac4j.oidc.scope`| scope is used by an application during authentication to authorize access to a user's details.|`openid profile email`|No|
+|`druid.auth.pac4j.oidc.clientAuthenticationMethod`|The client authentication method to use when communicating with the OIDC provider. Supported values: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `none`. If not specified, pac4j will auto-detect the method from the provider's discovery document. Set this explicitly if you need to use a specific method (e.g., when your provider advertises multiple methods but you want to use a particular one).|Auto [...]
:::info
Users must set a strong passphrase to ensure that an attacker is not able to guess it simply by brute force.
diff --git a/docs/latest/development/extensions-core/examples.md b/docs/38.0.0/development/extensions-core/examples.md
similarity index 79%
copy from docs/latest/development/extensions-core/examples.md
copy to docs/38.0.0/development/extensions-core/examples.md
index 577ee30f6..8878256e1 100644
--- a/docs/latest/development/extensions-core/examples.md
+++ b/docs/38.0.0/development/extensions-core/examples.md
@@ -23,4 +23,4 @@ title: "Extension Examples"
-->
-This extension was removed in Apache Druid 0.16.0. In prior versions, the extension provided obsolete facilities to ingest data from the Twitter 'Spritzer' data stream as well as the Wikipedia changes IRC channel.
+This extension was removed in Apache® Druid 0.16.0. In prior versions, the extension provided obsolete facilities to ingest data from the Twitter 'Spritzer' data stream as well as the Wikipedia changes IRC channel.
diff --git a/docs/latest/development/extensions-core/google.md b/docs/38.0.0/development/extensions-core/google.md
similarity index 93%
copy from docs/latest/development/extensions-core/google.md
copy to docs/38.0.0/development/extensions-core/google.md
index a9d1edefe..bff1d2696 100644
--- a/docs/latest/development/extensions-core/google.md
+++ b/docs/38.0.0/development/extensions-core/google.md
@@ -28,7 +28,7 @@ This extension allows you to do 2 things:
* [Ingest data](#reading-data-from-google-cloud-storage) from files stored in Google Cloud Storage.
* Write segments to [deep storage](#deep-storage) in GCS.
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-google-extensions` in the extensions load list.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-google-extensions` in the extensions load list.
### Required Configuration
diff --git a/docs/latest/development/extensions-core/hdfs.md b/docs/38.0.0/development/extensions-core/hdfs.md
similarity index 86%
copy from docs/latest/development/extensions-core/hdfs.md
copy to docs/38.0.0/development/extensions-core/hdfs.md
index f6994e663..32a84a179 100644
--- a/docs/latest/development/extensions-core/hdfs.md
+++ b/docs/38.0.0/development/extensions-core/hdfs.md
@@ -22,7 +22,7 @@ title: "HDFS"
~ under the License.
-->
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-hdfs-storage` in the extensions load list and run druid processes with `GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_keyfile` in the environment.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-hdfs-storage` in the extensions load list and run druid processes with `GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_keyfile` in the environment.
## Deep Storage
diff --git a/docs/latest/development/extensions-core/k8s-jobs.md b/docs/38.0.0/development/extensions-core/k8s-jobs.md
similarity index 76%
copy from docs/latest/development/extensions-core/k8s-jobs.md
copy to docs/38.0.0/development/extensions-core/k8s-jobs.md
index 1c8613276..b91241639 100644
--- a/docs/latest/development/extensions-core/k8s-jobs.md
+++ b/docs/38.0.0/development/extensions-core/k8s-jobs.md
@@ -25,7 +25,7 @@ title: "MM-less Druid in K8s"
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Apache Druid Extension to enable using Kubernetes for launching and managing tasks instead of the Middle Managers. This extension allows you to launch tasks as kubernetes jobs removing the need for your middle manager.
+Apache® Druid Extension to enable using Kubernetes® for launching and managing tasks instead of the Middle Managers. This extension allows you to launch tasks as kubernetes jobs removing the need for your middle manager.
## How it works
@@ -350,7 +350,7 @@ The logic defining how the pod template is built for your Kubernetes Job depends
### Overlord Single Container Pod Adapter/Overlord Multi Container Pod Adapter
The overlord single container pod adapter takes the podSpec of your `Overlord` pod and creates a kubernetes job from this podSpec. This is the default pod adapter implementation, to explicitly enable it you can specify the runtime property `druid.indexer.runner.k8s.adapter.type: overlordSingleContainer`
-The overlord multi container pod adapter takes the podSpec of your `Overlord` pod and creates a kubernetes job from this podSpec. It uses kubexit to manage dependency ordering between the main container that runs your druid peon and other sidecars defined in the `Overlord` pod spec. Thus if you have sidecars such as Splunk or Istio it will be able to handle them. To enable this pod adapter you can specify the runtime property `druid.indexer.runner.k8s.adapter.type: overlordMultiContainer`
+The Overlord multi-container pod adapter uses the pod specification of your Overlord pod to create a Kubernetes job. It uses kubexit to manage dependency ordering between the main container that runs your Druid peon and other sidecars defined in the Overlord pod specification. This allows the adapter to handle sidecars such Splunk® or Istio. To enable this pod adapter, set the runtime property `druid.indexer.runner.k8s.adapter.type: overlordMultiContainer`.
For the sidecar support to work for the multi container pod adapter, your entry point / command in docker must be explicitly defined your spec.
@@ -431,7 +431,7 @@ template:
env:
- name: CUSTOM_ENV_VARIABLE
value: "hello"
- image: apache/druid:37.0.0
+ image: apache/druid:38.0.0
name: main
ports:
- containerPort: 8091
@@ -483,6 +483,8 @@ template:
Any runtime property or JVM config used by the peon process can also be passed. E.G. below is an example of a ConfigMap that can be used to generate the `nodetype-config-volume` mount in the above template.
+The peon container startup script (`peon.sh`) reads `jvm.config` from the directory mounted as `nodetype-config-volume` and prepends its contents to the peon's `JAVA_OPTS` before launching the JVM. If an option is set both in `jvm.config` and in `JAVA_OPTS` (for example via `druid.indexer.runner.javaOptsArray` when using the `overlordSingleContainer` or `overlordMultiContainer` adapters, which inject `JAVA_OPTS` as a container environment variable), the `JAVA_OPTS` value takes precedence [...]
+
<details>
<summary>Example ConfigMap</summary>
@@ -567,7 +569,7 @@ data:
spec:
containers:
- name: main
- image: apache/druid:37.0.0
+ image: apache/druid:38.0.0
command:
- sh
- -c
@@ -763,6 +765,16 @@ All three examples below are equivalent.
In all the above cases, Druid will match the selector to any value of task type. Druid applies similar logic for `dataSource`. For `context.tags` setting `null` or an empty object `{}` is equivalent.
+##### Override pod template via context
+
+Set the `podTemplateSelectionKey` key in a task's context to pick a configured pod template directly, bypassing the selection strategy. The value is the same `selectionKey` used by `selectorBased` strategy (i.e. the suffix of `druid.indexer.runner.k8s.podTemplate.<selectionKey>`).
+
+```json
+"context": { "podTemplateSelectionKey": "podSpec1" }
+```
+
+This is gated by the runtime property `druid.indexer.runner.allowTaskPodTemplateSelection`, which defaults to `false`. If the key doesn't match any configured template, the task fails to launch.
+
#### Running Task Pods in Another Namespace
It is possible to run task pods in a different namespace from the rest of your Druid cluster.
@@ -775,7 +787,7 @@ If you are running multiple Druid clusters and would like to have a dedicated na
Warning: When `druid.indexer.runner.overlordNamespace` and `druid.indexer.runner.k8sTaskPodNamePrefix` is configured, users should ensure that all running tasks are stopped when changing these values. Failure to do so will cause the Overlord to lose track of running tasks, and re-launch them. This may lead to duplicate data and possibly metadata inconsistency issues.
-Druid will tag Kubernetes jobs with a `druid.overlord.namespace` label. This label helps Druid filter out Kubernetes jobs belonging to other namespaces. Should you need to deploy a Druid cluster on a namespace `N1` that is already running tasks from another namespace `N2`, take note to set `druid.indexer.runner.overlordNamespace` to `druid.indexer.runner.namespace` (which is `N1`). Failure to do so will result in the cluster in `N1` detecting task pods created from both `N1` and `N2`.
+When using the custom template pod adapter, Druid will tag Kubernetes jobs with a `druid.overlord.namespace` label. This label helps Druid filter out Kubernetes jobs belonging to other namespaces. Should you need to deploy a Druid cluster on a namespace `N1` that is already running tasks from another namespace `N2`, take note to set `druid.indexer.runner.overlordNamespace` to `druid.indexer.runner.namespace` (which is `N1`). Failure to do so will result in the cluster in `N1` detecting t [...]
##### Differentiating Task Pods Created From Multiple Namespaces
@@ -797,11 +809,132 @@ Ensure that when you are running task pods in another namespace, your task pods
Should you require the needed permissions for interacting across Kubernetes namespaces, you can specify a kubeconfig file, and provided the necessary permissions. You can then use the `KUBECONFIG` environment variable to allow your Overlord deployment to find your kubeconfig file. Refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) for more information.
+
+### Running tasks on multiple Kubernetes clusters
+
+You can configure the Kubernetes task runner to launch tasks across multiple Kubernetes clusters. This is useful when
+you want one Druid Overlord to schedule tasks into several Kubernetes clusters while keeping one Druid metadata store
+and one Druid ingestion control plane.
+
+To enable multi-cluster scheduling, set `druid.indexer.runner.type` to `multik8s` and configure at least one
+`druid.indexer.runner.clusters` entry. The multi-cluster runner uses the same task pod adapters, dynamic config,
+capacity, labels, annotations, shared informer mode, and pod template selection settings as the single-cluster
+Kubernetes task runner.
+
+```properties
+druid.indexer.runner.type=multik8s
+druid.indexer.task.encapsulatedTask=true
+
+druid.indexer.runner.capacity=20
+druid.indexer.runner.namespace=druid-overlord
+druid.indexer.runner.clusterSelector.type=leastTask
+
+druid.indexer.runner.clusters[0].name=cluster-a
+druid.indexer.runner.clusters[0].taskNamespace=druid-tasks-a
+druid.indexer.runner.clusters[0].kubeconfigPath=/etc/druid/kubeconfigs/cluster-a.yaml
+
+druid.indexer.runner.clusters[1].name=cluster-b
+druid.indexer.runner.clusters[1].taskNamespace=druid-tasks-b
+druid.indexer.runner.clusters[1].kubeconfigPath=/etc/druid/kubeconfigs/cluster-b.yaml
+```
+
+The runner creates one Kubernetes client and one underlying Kubernetes task runner per configured cluster. The
+configured `capacity` is a global limit for all clusters combined, not a per-cluster limit.
+
+When using the default `overlordSingleContainer` adapter or the `overlordMultiContainer` adapter, Druid reads the local
+Overlord pod spec from the Kubernetes cluster where the Overlord is running, then creates the task job in the selected
+target cluster's `taskNamespace`. Set `druid.indexer.runner.overlordNamespace`, or `druid.indexer.runner.namespace`, to
+the namespace that contains the Overlord pod. If neither is set, Druid can only fall back to `clusters[0].taskNamespace`
+when there is a single enabled cluster entry that does not specify `kubeconfigPath`. If your target clusters do not have
+the same service accounts, secrets, ConfigMaps, volumes, images, or sidecars referenced by the local Overlord pod, use
+the `customTemplateAdapter` instead and provide pod templates that are valid for each target cluster.
+
+If you use the custom template pod adapter and need an explicit job owner label, set `overlordIdentifier` to the same
+stable value for each cluster entry that belongs to the same Druid deployment:
+
+```properties
+druid.indexer.runner.clusters[0].overlordIdentifier=druid-overlord-prod
+druid.indexer.runner.clusters[1].overlordIdentifier=druid-overlord-prod
+```
+
+#### Cluster configuration
+
+Each `druid.indexer.runner.clusters[N]` entry supports the following properties:
+
+| Property | Possible Values | Description | Default | Required |
+| --- | --- | --- | --- | --- |
+| `name` | `String` | Human-readable name for the cluster. When set, Druid adds this value to task context tags as `k8s_cluster`. Use unique names so pod template selection and operational logs are unambiguous. | `null` | No |
+| `taskNamespace` | `String` | Kubernetes namespace where task pods and jobs run for this cluster. | - | Yes |
+| `kubeconfigPath` | `String` | Path to the kubeconfig file that Druid uses to connect to this cluster. If omitted, Druid uses the default Kubernetes client configuration available to the Overlord process. | `null` | No |
+| `overlordIdentifier` | Valid Kubernetes label value | Logical owner identifier for jobs created through the custom template pod adapter. Druid writes it to the `druid.overlord.namespace` Kubernetes job label and uses it when listing jobs, so an underlying runner only sees jobs with the same identifier. Set this when multiple Druid clusters or multiple configured runners may share the same Kubernetes task namespace. | `null` | No |
+| `disabled` | `boolean` | Prevents Druid from scheduling new tasks on this cluster. Druid still starts the underlying runner so it can monitor tasks that already exist in the cluster. At least one configured cluster must be enabled. | `false` | No |
+
+`overlordIdentifier` is a user-defined value. It is not the Kubernetes cluster name and does not need to match the
+Overlord service name. Treat it as a stable owner label for task jobs. Because Druid writes the value directly to a
+Kubernetes label, it must satisfy Kubernetes label value rules: at most 63 characters, beginning and ending with an
+alphanumeric character, with only alphanumeric characters, `-`, `_`, and `.` in between. You can usually omit it when
+each configured cluster uses a separate Kubernetes cluster or a separate `taskNamespace`. Configure it when jobs from
+different Druid deployments, or different multi-cluster runner entries, could otherwise appear in the same namespace
+with the same `druid.k8s.peons` label. For one Druid deployment spanning multiple Kubernetes clusters, use the same
+`overlordIdentifier` value for each cluster entry.
+
+#### Cluster selection
+
+The multi-cluster runner selects among enabled clusters using `druid.indexer.runner.clusterSelector.type`.
+
+| Value | Description |
+| --- | --- |
+| `roundrobin` | Selects enabled clusters in order. This is the default. |
+| `random` | Selects a random enabled cluster. |
+| `leastTask` | Selects from the enabled clusters with the fewest known tasks. If more than one cluster has the same count, Druid selects one of them randomly. |
+
+#### Pod template selection by cluster
+
+When a selected cluster has a configured `name`, Druid adds the cluster name to the task context tags as
+`k8s_cluster`. You can use this tag with the `selectorBased` [pod template selection](#pod-template-selection) strategy
+to choose different pod templates per Kubernetes cluster.
+
+```json
+{
+ "type": "default",
+ "podTemplateSelectStrategy": {
+ "type": "selectorBased",
+ "selectors": [
+ {
+ "selectionKey": "cluster-a-template",
+ "context.tags": { "k8s_cluster": ["cluster-a"] }
+ },
+ {
+ "selectionKey": "cluster-b-template",
+ "context.tags": { "k8s_cluster": ["cluster-b"] }
+ }
+ ]
+ }
+}
+```
+
+Configure the corresponding pod templates with the same `selectionKey` values:
+
+```properties
+druid.indexer.runner.k8s.podTemplate.base=/path/to/basePodSpec.yaml
+druid.indexer.runner.k8s.podTemplate.cluster-a-template=/path/to/cluster-a-podSpec.yaml
+druid.indexer.runner.k8s.podTemplate.cluster-b-template=/path/to/cluster-b-podSpec.yaml
+```
+
+#### Permissions
+
+The Overlord process must be able to read every configured kubeconfig file. Each kubeconfig must grant access to create,
+list, watch, get, and delete jobs and pods in that cluster's `taskNamespace`. If you use `overlordSingleContainer` or
+`overlordMultiContainer`, the local Kubernetes credentials available to the Overlord process must also be able to get
+the Overlord pod from `druid.indexer.runner.overlordNamespace` or `druid.indexer.runner.namespace`. If you enable
+`druid.indexer.runner.useK8sSharedInformers`, each configured cluster also starts shared informers against its
+`taskNamespace`.
+
### Properties
| Property | Possible Values | Description | Default | Required |
| --- | --- | --- | --- | --- |
-| `druid.indexer.runner.namespace` | `String` | If Overlord and task pods are running in different namespaces, specify the Overlord namespace. | - | Yes |
-| `druid.indexer.runner.overlordNamespace` | `String` | Only applicable when using Custom Template Pod Adapter. If Overlord and task pods are running in different namespaces, specify the Overlord namespace. <br /> Warning: You need to stop all running tasks in Druid to change this property. Failure to do so will lead to duplicate data and metadata inconsistencies. | `""` | No |
+| `druid.indexer.runner.namespace` | `String` | For the single-cluster `k8s` runner, the namespace where task pods run. For `multik8s`, `clusters[N].taskNamespace` controls where task jobs run, and this property is only used as a fallback namespace for reading the local Overlord pod spec with `overlordSingleContainer` or `overlordMultiContainer`. | - | Yes for `k8s`; No for `multik8s` |
+| `druid.indexer.runner.overlordNamespace` | `String` | If Overlord and task pods are running in different namespaces, specify the Overlord namespace. For `multik8s` with `overlordSingleContainer` or `overlordMultiContainer`, Druid uses this namespace to read the local Overlord pod spec. When using Custom Template Pod Adapter, Druid uses this namespace for job ownership labels and filtering. <br /> Warning: You need to stop all running tasks in Druid to change this property. Failure to d [...]
| `druid.indexer.runner.k8sTaskPodNamePrefix` | `String` | Use this if you want to change your task name to contain a more human-readable prefix. Maximum 30 characters. Special characters `: - . _` will be ignored. <br /> Warning: You need to stop all running tasks in Druid to change this property. Failure to do so will lead to duplicate data and metadata inconsistencies. | `""` | No |
| `druid.indexer.runner.debugJobs` | `boolean` | Boolean flag used to disable clean up of K8s jobs after tasks complete. | False | No |
| `druid.indexer.runner.sidecarSupport` | `boolean` | Deprecated, specify adapter type as runtime property `druid.indexer.runner.k8s.adapter.type: overlordMultiContainer` instead. If your overlord pod has sidecars, this will attempt to start the task with the same sidecars as the overlord pod. | False | No |
@@ -823,6 +956,12 @@ Should you require the needed permissions for interacting across Kubernetes name
| `druid.indexer.runner.logSaveTimeout` | `Duration` | The peon executing the ingestion task makes a best effort to persist the pod logs from `k8s` to persistent task log storage. The timeout ensures that `k8s` connection issues do not cause the pod to hang indefinitely thereby blocking Overlord operations. If the timeout occurs before the logs are saved, those logs will not be available in Druid. | `PT300S` | NO |
| `druid.indexer.runner.useK8sSharedInformers` | `boolean` | Whether to use shared informers to watch for pod/job changes. This is more efficient on the Kubernetes API server, but may use more memory in the Overlord. | `false` | No |
| `druid.indexer.runner.k8sSharedInformerResyncPeriod` | `Duration` | When using shared informers, controls how frequently the informers resync with the Kubernetes API server. This prevents change events from being missed, keeping the informer cache clean and accurate. | `PT300S` | No |
+| `druid.indexer.runner.clusterSelector.type` | `String` (`roundrobin`, `random`, `leastTask`) | Only applicable when `druid.indexer.runner.type` is `multik8s`. Strategy used to select which enabled Kubernetes cluster receives the next task. | `roundrobin` | No |
+| `druid.indexer.runner.clusters[N].name` | `String` | Only applicable when `druid.indexer.runner.type` is `multik8s`. Human-readable name for cluster `N`. When set, Druid adds this value to task context tags as `k8s_cluster`. | `null` | No |
+| `druid.indexer.runner.clusters[N].taskNamespace` | `String` | Only applicable when `druid.indexer.runner.type` is `multik8s`. Kubernetes namespace where task pods and jobs run for cluster `N`. | - | Yes |
+| `druid.indexer.runner.clusters[N].kubeconfigPath` | `String` | Only applicable when `druid.indexer.runner.type` is `multik8s`. Path to the kubeconfig file for cluster `N`. If omitted, Druid uses the default Kubernetes client configuration available to the Overlord process. | `null` | No |
+| `druid.indexer.runner.clusters[N].overlordIdentifier` | Valid Kubernetes label value | Only applicable when `druid.indexer.runner.type` is `multik8s`. Logical owner identifier for jobs created through the custom template pod adapter. Druid writes it to the `druid.overlord.namespace` Kubernetes job label and uses it when listing jobs. Use the same value for cluster entries that belong to the same Druid deployment. Set this when multiple Druid clusters or multiple configured runners may [...]
+| `druid.indexer.runner.clusters[N].disabled` | `boolean` | Only applicable when `druid.indexer.runner.type` is `multik8s`. Prevents Druid from scheduling new tasks on cluster `N` while continuing to monitor existing tasks there. | `false` | No |
### Metrics added
@@ -880,7 +1019,7 @@ To do this, set the following property.
|Property| Possible Values |Description|Default|required|
|--------|-----------------|-----------|-------|--------|
|`druid.indexer.runner.k8sAndWorker.runnerStrategy.type`| `String` (e.g., `k8s`, `worker`, `taskType`)| Defines the strategy for task runner selection. |`k8s`|No|
-|`druid.indexer.runner.k8sAndWorker.runnerStrategy.workerType`| `String` (e.g., `httpRemote`, `remote`)| Specifies the variant of the worker task runner to be utilized.|`httpRemote`|No|
+|`druid.indexer.runner.k8sAndWorker.runnerStrategy.workerType`| `String` (e.g., `httpRemote`)| Specifies the variant of the worker task runner to be utilized.|`httpRemote`|No|
| **For `taskType` runner strategy:**|||||
|`druid.indexer.runner.k8sAndWorker.runnerStrategy.taskType.default`| `String` (e.g., `k8s`, `worker`) | Specifies the default runner to use if no overrides apply. This setting ensures there is always a fallback runner available.|None|No|
|`druid.indexer.runner.k8sAndWorker.runnerStrategy.taskType.overrides`| `JsonObject`(e.g., `{"index_kafka": "worker"}`)| Defines task-specific overrides for runner types. Each entry sets a task type to a specific runner, allowing fine control. |`{}`|No|
diff --git a/docs/latest/development/extensions-core/kubernetes.md b/docs/38.0.0/development/extensions-core/kubernetes.md
similarity index 95%
copy from docs/latest/development/extensions-core/kubernetes.md
copy to docs/38.0.0/development/extensions-core/kubernetes.md
index 3115ee905..776545ff2 100644
--- a/docs/latest/development/extensions-core/kubernetes.md
+++ b/docs/38.0.0/development/extensions-core/kubernetes.md
@@ -24,7 +24,7 @@ title: "Kubernetes"
Consider this an [EXPERIMENTAL](../experimental.md) feature mostly because it has not been tested yet on a wide variety of long running Druid clusters.
-Apache Druid Extension to enable using Kubernetes API Server for node discovery and leader election. This extension allows Druid cluster deployment on Kubernetes without Zookeeper. It allows running multiple Druid clusters within same Kubernetes Cluster, See `clusterIdentifier` config below.
+Apache® Druid extension to enable using the Kubernetes® API Server for node discovery and leader election. This extension allows you to deploy a Druid cluster on Kubernetes without Zookeeper and run multiple Druid clusters within the same Kubernetes cluster. For more information, see the `clusterIdentifier` configuration below.
## Configuration
diff --git a/docs/latest/development/extensions-core/mysql.md b/docs/38.0.0/development/extensions-core/mysql.md
similarity index 98%
copy from docs/latest/development/extensions-core/mysql.md
copy to docs/38.0.0/development/extensions-core/mysql.md
index a3678f650..77e26446b 100644
--- a/docs/latest/development/extensions-core/mysql.md
+++ b/docs/38.0.0/development/extensions-core/mysql.md
@@ -23,7 +23,7 @@ title: "MySQL metadata store"
-->
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `mysql-metadata-storage` in the extensions load list.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `mysql-metadata-storage` in the extensions load list.
With the MySQL extension, you can use MySQL as a metadata store or ingest from a MySQL database.
diff --git a/docs/latest/development/extensions-core/orc.md b/docs/38.0.0/development/extensions-core/orc.md
similarity index 91%
copy from docs/latest/development/extensions-core/orc.md
copy to docs/38.0.0/development/extensions-core/orc.md
index cd9125155..ac705252e 100644
--- a/docs/latest/development/extensions-core/orc.md
+++ b/docs/38.0.0/development/extensions-core/orc.md
@@ -24,7 +24,7 @@ title: "ORC Extension"
## ORC extension
-This Apache Druid extension enables Druid to ingest and understand the Apache ORC data format.
+This Apache® Druid extension enables Druid to ingest and understand the Apache ORC data format.
The extension provides the [ORC input format](../../ingestion/data-formats.md#orc)
for [native batch ingestion](../../ingestion/native-batch.md).
diff --git a/docs/latest/development/extensions-core/parquet.md b/docs/38.0.0/development/extensions-core/parquet.md
similarity index 84%
copy from docs/latest/development/extensions-core/parquet.md
copy to docs/38.0.0/development/extensions-core/parquet.md
index cbeb446b8..889fe77ba 100644
--- a/docs/latest/development/extensions-core/parquet.md
+++ b/docs/38.0.0/development/extensions-core/parquet.md
@@ -23,5 +23,5 @@ title: "Apache Parquet Extension"
-->
-This Apache Druid module extends [Druid native batch](../../ingestion/native-batch.md) to ingest data directly from offline
-Apache Parquet files.
+This Apache® Druid module extends [Druid native batch](../../ingestion/native-batch.md) to ingest data directly from offline
+Apache® Parquet files.
diff --git a/docs/latest/development/extensions-core/postgresql.md b/docs/38.0.0/development/extensions-core/postgresql.md
similarity index 96%
copy from docs/latest/development/extensions-core/postgresql.md
copy to docs/38.0.0/development/extensions-core/postgresql.md
index 006a65ed4..a2fc8911a 100644
--- a/docs/latest/development/extensions-core/postgresql.md
+++ b/docs/38.0.0/development/extensions-core/postgresql.md
@@ -23,7 +23,7 @@ title: "PostgreSQL metadata store"
-->
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `postgresql-metadata-storage` in the extensions load list.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `postgresql-metadata-storage` in the extensions load list.
With the PostgreSQL extension, you can use PostgreSQL as a metadata store or ingest from a PostgreSQL database.
diff --git a/docs/latest/development/extensions-core/protobuf.md b/docs/38.0.0/development/extensions-core/protobuf.md
similarity index 97%
copy from docs/latest/development/extensions-core/protobuf.md
copy to docs/38.0.0/development/extensions-core/protobuf.md
index ff976224d..ca95aed72 100644
--- a/docs/latest/development/extensions-core/protobuf.md
+++ b/docs/38.0.0/development/extensions-core/protobuf.md
@@ -23,7 +23,7 @@ title: "Protobuf"
-->
-This Apache Druid extension enables Druid to ingest and understand the Protobuf data format. Make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-protobuf-extensions` in the extensions load list.
+This Apache® Druid extension enables Druid to ingest and understand the Protobuf data format. Make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-protobuf-extensions` in the extensions load list.
The `druid-protobuf-extensions` provides the [Protobuf InputFormat](../../ingestion/data-formats.md#protobuf)
for [stream ingestion](../../ingestion/index.md#streaming). See corresponding docs for details.
diff --git a/docs/latest/development/extensions-core/s3.md b/docs/38.0.0/development/extensions-core/s3.md
similarity index 98%
copy from docs/latest/development/extensions-core/s3.md
copy to docs/38.0.0/development/extensions-core/s3.md
index f56861e61..32f09f93f 100644
--- a/docs/latest/development/extensions-core/s3.md
+++ b/docs/38.0.0/development/extensions-core/s3.md
@@ -29,7 +29,7 @@ This extension allows you to do 2 things:
* [Ingest data](#reading-data-from-s3) from files stored in S3.
* Write segments to [deep storage](#deep-storage) in S3.
-To use this Apache Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-s3-extensions` in the extensions load list.
+To use this Apache® Druid extension, [include](../../configuration/extensions.md#loading-extensions) `druid-s3-extensions` in the extensions load list.
### Reading data from S3
diff --git a/docs/latest/development/extensions-core/simple-client-sslcontext.md b/docs/38.0.0/development/extensions-core/simple-client-sslcontext.md
similarity index 95%
copy from docs/latest/development/extensions-core/simple-client-sslcontext.md
copy to docs/38.0.0/development/extensions-core/simple-client-sslcontext.md
index 981e00107..be764c3d9 100644
--- a/docs/latest/development/extensions-core/simple-client-sslcontext.md
+++ b/docs/38.0.0/development/extensions-core/simple-client-sslcontext.md
@@ -23,7 +23,7 @@ title: "Simple SSLContext Provider Module"
-->
-This Apache Druid module contains a simple implementation of [SSLContext](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/javax/net/ssl/SSLContext.html)
+This Apache® Druid module contains a simple implementation of [SSLContext](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/javax/net/ssl/SSLContext.html)
that will be injected to be used with HttpClient that Druid processes use internally to communicate with each other. To learn more about
Java's SSL support, please refer to [this](https://docs.oracle.com/en/java/javase/17/security/java-secure-socket-extension-jsse-reference-guide.html) guide.
diff --git a/docs/latest/development/extensions-core/stats.md b/docs/38.0.0/development/extensions-core/stats.md
similarity index 96%
copy from docs/latest/development/extensions-core/stats.md
copy to docs/38.0.0/development/extensions-core/stats.md
index 280c3d5b6..54d6d93e7 100644
--- a/docs/latest/development/extensions-core/stats.md
+++ b/docs/38.0.0/development/extensions-core/stats.md
@@ -23,7 +23,7 @@ title: "Stats aggregator"
-->
-This Apache Druid extension includes stat-related aggregators, including variance and standard deviations, etc. Make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-stats` in the extensions load list.
+This Apache® Druid extension includes stat-related aggregators, including variance and standard deviations, etc. Make sure to [include](../../configuration/extensions.md#loading-extensions) `druid-stats` in the extensions load list.
## Variance aggregator
diff --git a/docs/latest/development/extensions-core/test-stats.md b/docs/38.0.0/development/extensions-core/test-stats.md
similarity index 96%
copy from docs/latest/development/extensions-core/test-stats.md
copy to docs/38.0.0/development/extensions-core/test-stats.md
index e37051b43..023d9d1a8 100644
--- a/docs/latest/development/extensions-core/test-stats.md
+++ b/docs/38.0.0/development/extensions-core/test-stats.md
@@ -23,7 +23,7 @@ title: "Test stats aggregators"
-->
-The `druid-stats` extension for Apache Druid incorporates aggregators to compute test statistics, including z-scores and p-values.
+The `druid-stats` extension for Apache® Druid incorporates aggregators to compute test statistics, including z-scores and p-values.
Please refer to [Democratizing Experimentation Data for Product Innovations](https://medium.com/paypal-tech/democratizing-experimentation-data-for-product-innovations-8b6e1cf40c27) for math background and details.
Make sure to include `druid-stats` extension in order to use these aggregators.
diff --git a/docs/latest/development/javascript.md b/docs/38.0.0/development/javascript.md
similarity index 97%
copy from docs/latest/development/javascript.md
copy to docs/38.0.0/development/javascript.md
index 4c3fc3dc2..f96787ec5 100644
--- a/docs/latest/development/javascript.md
+++ b/docs/38.0.0/development/javascript.md
@@ -24,7 +24,7 @@ sidebar_label: "JavaScript functionality"
-->
-This page discusses how to use JavaScript to extend Apache Druid.
+This page discusses how to use JavaScript to extend Apache® Druid.
## Examples
diff --git a/docs/38.0.0/development/modules.md b/docs/38.0.0/development/modules.md
new file mode 100644
index 000000000..ff0411b15
--- /dev/null
+++ b/docs/38.0.0/development/modules.md
@@ -0,0 +1,398 @@
+---
+id: modules
+title: "Creating extensions"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+Druid uses a module system that allows for the addition of extensions at runtime.
+
+## Writing your own extensions
+
+Druid's extensions leverage Guice in order to add things at runtime. Basically, Guice is a framework for Dependency Injection, but we use it to hold the expected object graph of the Druid process. Extensions can make any changes they want/need to the object graph via adding Guice bindings. While the extensions actually give you the capability to change almost anything however you want, in general, we expect people to want to extend one of the things listed below. This means that we honor [...]
+
+1. Add a new deep storage implementation by extending the `org.apache.druid.segment.loading.DataSegment*` and
+ `org.apache.druid.tasklogs.TaskLog*` classes.
+1. Add a new input source by extending `org.apache.druid.data.input.InputSource`.
+1. Add a new input entity by extending `org.apache.druid.data.input.InputEntity`.
+1. Add a new input source reader if necessary by extending `org.apache.druid.data.input.InputSourceReader`. You can use `org.apache.druid.data.input.impl.InputEntityIteratingReader` in most cases.
+1. Add a new input format by extending `org.apache.druid.data.input.InputFormat`.
+1. Add a new input entity reader by extending `org.apache.druid.data.input.TextReader` for text formats or `org.apache.druid.data.input.IntermediateRowParsingReader` for binary formats.
+1. Add Aggregators by extending `org.apache.druid.query.aggregation.AggregatorFactory`, `org.apache.druid.query.aggregation.Aggregator`,
+ and `org.apache.druid.query.aggregation.BufferAggregator`.
+1. Add PostAggregators by extending `org.apache.druid.query.aggregation.PostAggregator`.
+1. Add ExtractionFns by extending `org.apache.druid.query.extraction.ExtractionFn`.
+1. Add Complex metrics by extending `org.apache.druid.segment.serde.ComplexMetricSerde`.
+1. Add new Query types by extending `org.apache.druid.query.QueryRunnerFactory`, `org.apache.druid.query.QueryToolChest`, and
+ `org.apache.druid.query.Query`.
+1. Add new Jersey resources by calling `Jerseys.addResource(binder, clazz)`.
+1. Add new Jetty filters by extending `org.apache.druid.server.initialization.jetty.ServletFilterHolder`.
+1. Add new secret providers by extending `org.apache.druid.metadata.PasswordProvider`.
+1. Add new dynamic configuration providers by extending `org.apache.druid.metadata.DynamicConfigProvider`.
+1. Add new ingest transform by implementing the `org.apache.druid.segment.transform.Transform` interface from the `druid-processing` package.
+1. Bundle your extension with all the other Druid extensions
+
+Extensions are added to the system via an implementation of `org.apache.druid.initialization.DruidModule`.
+
+### Creating a Druid Module
+
+The DruidModule class is has two methods
+
+1. A `configure(Binder)` method
+2. A `getJacksonModules()` method
+
+The `configure(Binder)` method is the same method that a normal Guice module would have.
+
+The `getJacksonModules()` method provides a list of Jackson modules that are used to help initialize the Jackson ObjectMapper instances used by Druid. This is how you add extensions that are instantiated via Jackson (like AggregatorFactory and InputSource objects) to Druid.
+
+### Registering your Druid Module
+
+Once you have your DruidModule created, you will need to package an extra file in the `META-INF/services` directory of your jar. This is easiest to accomplish with a maven project by creating files in the `src/main/resources` directory. There are examples of this in the Druid code under the `cassandra-storage`, `hdfs-storage` and `s3-extensions` modules, for examples.
+
+The file that should exist in your jar is
+
+`META-INF/services/org.apache.druid.initialization.DruidModule`
+
+It should be a text file with a new-line delimited list of package-qualified classes that implement DruidModule like
+
+```txt
+org.apache.druid.storage.cassandra.CassandraDruidModule
+```
+
+If your jar has this file, then when it is added to the classpath or as an extension, Druid will notice the file and will instantiate instances of the Module. Your Module should have a default constructor, but if you need access to runtime configuration properties, it can have a method with @Inject on it to get a Properties object injected into it from Guice.
+
+### Adding a new deep storage implementation
+
+Check the `druid-azure-extensions`, `druid-google-extensions`, `druid-cassandra-storage`, `druid-hdfs-storage` and `druid-s3-extensions` modules for examples of how to do this.
+
+The basic idea behind the extension is that you need to add bindings for your [`DataSegmentPusher`](https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/segment/loading/DataSegmentPusher.java) and [`URIDataPuller`](https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/segment/loading/URIDataPuller.java) objects. The way to add them is something like (taken from HdfsStorageDruidModule)
+
+```java
+Binders.dataSegmentPullerBinder(binder)
+ .addBinding("hdfs")
+ .to(HdfsDataSegmentPuller.class).in(LazySingleton.class);
+
+Binders.dataSegmentPusherBinder(binder)
+ .addBinding("hdfs")
+ .to(HdfsDataSegmentPusher.class).in(LazySingleton.class);
+```
+
+`Binders.dataSegment*Binder()` is a call provided by the druid-core jar which sets up a Guice [multibind](https://github.com/google/guice/wiki/Multibindings) "MapBinder". If that doesn't make sense, don't worry about it; just think of it as a magical incantation.
+
+`addBinding("hdfs")` for the Puller binder creates a new handler for loadSpec objects of type "hdfs". For the Pusher binder it creates a new type value that you can specify for the `druid.storage.type` parameter.
+
+`to(...).in(...);` is normal Guice stuff.
+
+In addition to `DataSegmentPusher` and `URIDataPuller`, you can also bind:
+
+* [`DataSegmentKiller`](https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/segment/loading/DataSegmentKiller.java): Removes segments, used as part of the Kill Task to delete unused segments, i.e. perform garbage collection of segments that are either superseded by newer versions or that have been dropped from the cluster.
+* [`DataSegmentMover`](https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/segment/loading/DataSegmentMover.java): Allow migrating segments from one place to another, currently this is only used as part of the MoveTask to move unused segments to a different S3 bucket or prefix, typically to reduce storage costs of unused data (e.g. move to glacier or cheaper storage)
+* [`DataSegmentArchiver`](https://github.com/apache/druid/blob/master/processing/src/main/java/org/apache/druid/segment/loading/DataSegmentArchiver.java): Just a wrapper around Mover, but comes with a preconfigured target bucket/path, so it doesn't have to be specified at runtime as part of the ArchiveTask.
+
+### Validating your deep storage implementation
+
+**WARNING!** This is not a formal procedure, but a collection of hints to validate if your new deep storage implementation is able do push, pull and kill segments.
+
+It's recommended to use batch ingestion tasks to validate your implementation.
+The segment will be automatically rolled up to a Historical node after ~1 minute.
+In this way, you can validate both push (at realtime process) and pull (at Historical process) segments.
+
+#### DataSegmentPusher
+
+Wherever your data storage (cloud storage service, distributed file system, etc.) is, you should be able to see one new file: `index.zip` (`partitionNum_index.zip` for HDFS data storage) after your ingestion task ends.
+
+#### URIDataPuller
+
+After ~1 minute your ingestion task ends, you should be able to see your Historical process trying to load the new segment.
+
+#### DataSegmentKiller
+
+The easiest way of testing the segment killing is marking a segment as not used and then starting a killing task in the [web console](../operations/web-console.md).
+
+To mark a segment as not used, you need to connect to your metadata storage and update the `used` column to `false` on the segment table rows.
+
+To start a segment killing task, you need to access the web console then select `issue kill task` for the appropriate datasource.
+
+After the killing task ends, `index.zip` (`partitionNum_index.zip` for HDFS data storage) file should be deleted from the data storage.
+
+### Adding support for a new input source
+
+Adding support for a new input source requires to implement three interfaces, i.e., `InputSource`, `InputEntity`, and `InputSourceReader`.
+`InputSource` is to define where the input data is stored. `InputEntity` is to define how data can be read in parallel
+in [native parallel indexing](../ingestion/native-batch.md).
+`InputSourceReader` defines how to read your new input source and you can simply use the provided `InputEntityIteratingReader` in most cases.
+
+There is an example of this in the `druid-s3-extensions` module with the `S3InputSource` and `S3Entity`.
+
+Adding an InputSource is done almost entirely through the Jackson Modules instead of Guice. Specifically, note the implementation
+
+```java
+@Override
+public List<? extends Module> getJacksonModules()
+{
+ return ImmutableList.of(
+ new SimpleModule().registerSubtypes(new NamedType(S3InputSource.class, "s3"))
+ );
+}
+```
+
+This is registering the InputSource with Jackson's polymorphic serialization/deserialization layer. More concretely, having this will mean that if you specify a `"inputSource": { "type": "s3", ... }` in your IO config, then the system will load this InputSource for your `InputSource` implementation.
+
+Note that inside of Druid, we have made the `@JacksonInject` annotation for Jackson deserialized objects actually use the base Guice injector to resolve the object to be injected. So, if your InputSource needs access to some object, you can add a `@JacksonInject` annotation on a setter and it will get set on instantiation.
+
+### Adding support for a new data format
+
+Adding support for a new data format requires implementing two interfaces, i.e., `InputFormat` and `InputEntityReader`.
+`InputFormat` is to define how your data is formatted. `InputEntityReader` is to define how to parse your data and convert into Druid `InputRow`.
+
+There is an example in the `druid-orc-extensions` module with the `OrcInputFormat` and `OrcReader`.
+
+Adding an InputFormat is very similar to adding an InputSource. They operate purely through Jackson and thus should just be additions to the Jackson modules returned by your DruidModule.
+
+### Adding Aggregators
+
+Adding AggregatorFactory objects is very similar to InputSource objects. They operate purely through Jackson and thus should just be additions to the Jackson modules returned by your DruidModule.
+
+### Adding Complex Metrics
+
+Adding ComplexMetrics is a little ugly in the current version. The method of getting at complex metrics is through registration with the `ComplexMetrics.registerSerde()` method. There is no special Guice stuff to get this working, just in your `configure(Binder)` method register the serialization/deserialization.
+
+### Adding new Query types
+
+Adding a new Query type requires the implementation of three interfaces.
+
+1. `org.apache.druid.query.Query`
+1. `org.apache.druid.query.QueryToolChest`
+1. `org.apache.druid.query.QueryRunnerFactory`
+
+Registering these uses the same general strategy as a deep storage mechanism does. You do something like
+
+```java
+DruidBinders.queryToolChestBinder(binder)
+ .addBinding(SegmentMetadataQuery.class)
+ .to(SegmentMetadataQueryQueryToolChest.class);
+
+DruidBinders.queryRunnerFactoryBinder(binder)
+ .addBinding(SegmentMetadataQuery.class)
+ .to(SegmentMetadataQueryRunnerFactory.class);
+```
+
+The first one binds the SegmentMetadataQueryQueryToolChest for usage when a SegmentMetadataQuery is used. The second one does the same thing but for the QueryRunnerFactory instead.
+
+### Adding new Jersey resources
+
+Adding new Jersey resources to a module requires calling the following code to bind the resource in the module:
+
+```java
+Jerseys.addResource(binder, NewResource.class);
+```
+
+### Adding a new Password Provider implementation
+
+You will need to implement `org.apache.druid.metadata.PasswordProvider` interface. For every place where Druid uses PasswordProvider, a new instance of the implementation will be created,
+thus make sure all the necessary information required for fetching each password is supplied during object instantiation.
+In your implementation of `org.apache.druid.initialization.DruidModule`, `getJacksonModules` should look something like this -
+
+```java
+ return ImmutableList.of(
+ new SimpleModule("SomePasswordProviderModule")
+ .registerSubtypes(
+ new NamedType(SomePasswordProvider.class, "some")
+ )
+ );
+```
+
+where `SomePasswordProvider` is the implementation of `PasswordProvider` interface, you can have a look at `org.apache.druid.metadata.EnvironmentVariablePasswordProvider` for example.
+
+### Adding a new DynamicConfigProvider implementation
+
+You will need to implement `org.apache.druid.metadata.DynamicConfigProvider` interface. For every place where Druid uses DynamicConfigProvider, a new instance of the implementation will be created,
+thus make sure all the necessary information required for fetching all information is supplied during object instantiation.
+In your implementation of `org.apache.druid.initialization.DruidModule`, `getJacksonModules` should look something like this -
+
+```java
+ return ImmutableList.of(
+ new SimpleModule("SomeDynamicConfigProviderModule")
+ .registerSubtypes(
+ new NamedType(SomeDynamicConfigProvider.class, "some")
+ )
+ );
+```
+
+where `SomeDynamicConfigProvider` is the implementation of `DynamicConfigProvider` interface, you can have a look at `org.apache.druid.metadata.MapStringDynamicConfigProvider` for example.
+
+### Adding a Transform Extension
+
+To create a transform extension implement the `org.apache.druid.segment.transform.Transform` interface. You'll need to install the `druid-processing` package to import `org.apache.druid.segment.transform`.
+
+```java
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.druid.segment.transform.RowFunction;
+import org.apache.druid.segment.transform.Transform;
+
+public class MyTransform implements Transform {
+ private final String name;
+
+ @JsonCreator
+ public MyTransform(
+ @JsonProperty("name") final String name
+ ) {
+ this.name = name;
+ }
+
+ @JsonProperty
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public RowFunction getRowFunction() {
+ return new MyRowFunction();
+ }
+
+ static class MyRowFunction implements RowFunction {
+ @Override
+ public Object eval(Row row) {
+ return "transformed-value";
+ }
+ }
+}
+```
+
+Then register your transform as a Jackson module.
+
+```java
+import com.fasterxml.jackson.databind.Module;
+import com.fasterxml.jackson.databind.jsontype.NamedModule;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.google.inject.Binder;
+import com.google.common.collect.ImmutableList;
+import org.apache.druid.initialization.DruidModule;
+
+public class MyTransformModule implements DruidModule {
+ @Override
+ public List<? extends Module> getJacksonModules() {
+ return return ImmutableList.of(
+ new SimpleModule("MyTransformModule").registerSubtypes(
+ new NamedType(MyTransform.class, "my-transform")
+ )
+ ):
+ }
+
+ @Override
+ public void configure(Binder binder) {
+ }
+}
+```
+
+### Adding your own custom pluggable Coordinator Duty
+
+The coordinator periodically runs jobs, so-called `CoordinatorDuty` which include loading new segments, segment balancing, etc.
+Druid users can add custom pluggable coordinator duties, which are not part of Core Druid, without modifying any Core Druid classes.
+Users can do this by writing their own custom coordinator duty implementing the interface `CoordinatorCustomDuty` and setting the `JsonTypeName`.
+Next, users will need to register their custom coordinator as subtypes in their Module's `DruidModule#getJacksonModules()`.
+Once these steps are done, user will be able to load their custom coordinator duty using the following properties:
+
+```properties
+druid.coordinator.dutyGroups=[<GROUP_NAME_1>, <GROUP_NAME_2>, ...]
+druid.coordinator.<GROUP_NAME_1>.duties=[<DUTY_NAME_MATCHING_JSON_TYPE_NAME_1>, <DUTY_NAME_MATCHING_JSON_TYPE_NAME_2>, ...]
+druid.coordinator.<GROUP_NAME_1>.period=<GROUP_NAME_1_RUN_PERIOD>
+
+druid.coordinator.<GROUP_NAME_1>.duty.<DUTY_NAME_MATCHING_JSON_TYPE_NAME_1>.<SOME_CONFIG_1_KEY>=<SOME_CONFIG_1_VALUE>
+druid.coordinator.<GROUP_NAME_1>.duty.<DUTY_NAME_MATCHING_JSON_TYPE_NAME_1>.<SOME_CONFIG_2_KEY>=<SOME_CONFIG_2_VALUE>
+```
+
+In the new system for pluggable Coordinator duties, similar to what coordinator already does today, the duties can be grouped together.
+The duties will be grouped into multiple groups as per the elements in list `druid.coordinator.dutyGroups`.
+All duties in the same group will have the same run period configured by `druid.coordinator.<GROUP_NAME>.period`.
+Currently, there is a single thread running the duties sequentially for each group.
+
+For example, see `KillSupervisorsCustomDuty` for a custom coordinator duty implementation and the `KillSupervisorsCustomDutyTest`
+for sample properties that may be used to configure the `KillSupervisorsCustomDuty`.
+
+### Routing data through a HTTP proxy for your extension
+
+You can add the ability for the `HttpClient` of your extension to connect through an HTTP proxy.
+
+To support proxy connection for your extension's HTTP client:
+
+1. Add `HttpClientProxyConfig` as a `@JsonProperty` to the HTTP config class of your extension.
+2. In the extension's module class, add `HttpProxyConfig` config to `HttpClientConfig`.
+For example, where `config` variable is the extension's HTTP config from step 1:
+
+```java
+final HttpClientConfig.Builder builder = HttpClientConfig
+ .builder()
+ .withNumConnections(1)
+ .withReadTimeout(config.getReadTimeout().toStandardDuration())
+ .withHttpProxyConfig(config.getProxyConfig());
+```
+
+### Bundle your extension with all the other Druid extensions
+
+When you do `mvn install`, Druid extensions will be packaged within the Druid tarball and `extensions` directory, which are both underneath `distribution/target/`.
+
+If you want your extension to be included, you can add your extension's maven coordinate as an argument at
+[distribution/pom.xml](https://github.com/apache/druid/blob/master/distribution/pom.xml#L95)
+
+During `mvn install`, maven will install your extension to the local maven repository, and then call [pull-deps](../operations/pull-deps.md) to pull your extension from
+there. In the end, you should see your extension underneath `distribution/target/extensions` and within Druid tarball.
+
+### Managing dependencies
+
+Managing library collisions can be daunting for extensions which draw in commonly used libraries. Here is a list of group IDs for libraries that are suggested to be specified with a `provided` scope to prevent collision with versions used in druid:
+
+```txt
+"org.apache.druid",
+"com.metamx.druid",
+"asm",
+"org.ow2.asm",
+"org.jboss.netty",
+"com.google.guava",
+"com.google.code.findbugs",
+"com.google.protobuf",
+"com.esotericsoftware.minlog",
+"log4j",
+"org.slf4j",
+"commons-logging",
+"org.eclipse.jetty",
+"org.mortbay.jetty",
+"com.sun.jersey",
+"com.sun.jersey.contribs",
+"common-beanutils",
+"commons-codec",
+"commons-lang",
+"commons-cli",
+"commons-io",
+"javax.activation",
+"org.apache.httpcomponents",
+"org.apache.zookeeper",
+"org.codehaus.jackson",
+"com.fasterxml.jackson",
+"com.fasterxml.jackson.core",
+"com.fasterxml.jackson.dataformat",
+"com.fasterxml.jackson.datatype",
+"org.roaringbitmap",
+"net.java.dev.jets3t"
+```
+
+See the documentation in `org.apache.druid.cli.PullDependencies` for more information.
diff --git a/docs/38.0.0/development/overview.md b/docs/38.0.0/development/overview.md
new file mode 100644
index 000000000..b51c4f8c0
--- /dev/null
+++ b/docs/38.0.0/development/overview.md
@@ -0,0 +1,78 @@
+---
+id: overview
+title: "Developing on Apache Druid"
+sidebar_label: "Developing on Druid"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+Druid's codebase consists of several major components. For developers interested in learning the code, this document provides
+a high level overview of the main components that make up Druid and the relevant classes to start from to learn the code.
+
+## Storage format
+
+Data in Druid is stored in a custom column format known as a [segment](../design/segments.md). Segments are composed of
+different types of columns. `Column.java` and the classes that extend it is a great place to looking into the storage format.
+
+## Segment creation
+
+Raw data is ingested in `IncrementalIndex.java`, and segments are created in `IndexMerger.java`.
+
+## Storage engine
+
+Druid segments are memory mapped in `IndexIO.java` to be exposed for querying.
+
+## Query engine
+
+Most of the logic related to Druid queries can be found in the Query* classes. Druid leverages query runners to run queries.
+Query runners often embed other query runners and each query runner adds on a layer of logic. A good starting point to trace
+the query logic is to start from `QueryResource.java`.
+
+## Coordination
+
+Most of the coordination logic for Historical processes is on the Druid Coordinator. The starting point here is `DruidCoordinator.java`.
+Most of the coordination logic for (real-time) ingestion is in the Druid indexing service. The starting point here is `OverlordResource.java`.
+
+## Real-time Ingestion
+
+Druid streaming tasks are based on the 'seekable stream' classes such as `SeekableStreamSupervisor.java`,
+`SeekableStreamIndexTask.java`, and `SeekableStreamIndexTaskRunner.java`. The data processing happens through
+`StreamAppenderator.java`, and the persist and hand-off logic is in `StreamAppenderatorDriver.java`.
+
+## Native Batch Ingestion
+
+Druid native batch ingestion main task types are based on `AbstractBatchTask.java` and `AbstractBatchSubtask.java`.
+Parallel processing uses `ParallelIndexSupervisorTask.java`, which spawns subtasks to perform various operations such
+as data analysis and partitioning depending on the task specification. Segment generation happens in
+`SinglePhaseSubTask.java`, `PartialHashSegmentGenerateTask.java`, or `PartialRangeSegmentGenerateTask.java` through
+`BatchAppenderator`, and the persist and hand-off logic is in `BatchAppenderatorDriver.java`.
+
+## Internal UIs
+
+Druid currently has two internal UIs. One is for the Coordinator and one is for the Overlord.
+
+At some point in the future, we will likely move the internal UI code out of core Druid.
+
+## Client libraries
+
+We welcome contributions for new client libraries to interact with Druid. See the
+[Community and third-party libraries](https://druid.apache.org/libraries.html) page for links to existing client
+libraries.
diff --git a/docs/38.0.0/development/versioning.md b/docs/38.0.0/development/versioning.md
new file mode 100644
index 000000000..b01c28cc1
--- /dev/null
+++ b/docs/38.0.0/development/versioning.md
@@ -0,0 +1,46 @@
+---
+id: versioning
+title: "Versioning"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+This page discusses how we do versioning and provides information on our stable releases.
+
+Versioning Strategy
+-------------------
+
+We generally follow [semantic versioning](http://semver.org/). The general idea is
+
+* "Major" version (leftmost): backwards incompatible, no guarantees exist about APIs between the versions
+* "Minor" version (middle number): you can move forward from a smaller number to a larger number, but moving backwards *might* be incompatible.
+* "bug-fix" version ("patch" or the rightmost): Interchangeable. The higher the number, the more things are fixed (hopefully), but the programming interfaces are completely compatible and you should be able to just drop in a new jar and have it work.
+
+Note that this is defined in terms of programming API, **not** in terms of functionality. It is possible that a brand new awesome way of doing something is introduced in a "bug-fix" release version if it doesn’t add to the public API or change it.
+
+One exception for right now, while we are still in major version 0, we are considering the APIs to be in beta and are conflating "major" and "minor" so a minor version increase could be backwards incompatible for as long as we are at major version 0. These will be communicated via email on the group.
+
+For external deployments, we recommend running the stable release tag. Releases are considered stable after we have deployed them into our production environment and they have operated bug-free for some time.
+
+Tagging strategy
+----------------
+
+Tags of the codebase are equivalent to release candidates. We tag the code every time we want to take it through our release process, which includes some QA cycles and deployments. So, it is not safe to assume that a tag is a stable release, it is a solidification of the code as it goes through our production QA cycle and deployment. Tags will never change, but we often go through a number of iterations of tags before actually getting a stable release onto production. So, it is recommend [...]
diff --git a/docs/38.0.0/ingestion/concurrent-append-replace.md b/docs/38.0.0/ingestion/concurrent-append-replace.md
new file mode 100644
index 000000000..2dd7fb3ab
--- /dev/null
+++ b/docs/38.0.0/ingestion/concurrent-append-replace.md
@@ -0,0 +1,153 @@
+---
+id: concurrent-append-replace
+title: Concurrent append and replace
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+Concurrent append and replace safely replaces the existing data in an interval of a datasource while new data is being appended to that interval. One of the most common applications of this feature is appending new data (such as with streaming ingestion) to an interval while compaction of that interval is already in progress. Druid partitions the data ingested during this time using `dynamic` partitioning. The subsequent compaction run would partition the data into the granularity you sp [...]
+
+To set up concurrent append and replace, use the context flag `useConcurrentLocks`. Druid will then determine the correct lock type for you, either append or replace. Although you can set the type of lock manually, we don't recommend it.
+
+## Update compaction config to use concurrent locks
+
+If you want to append data to a datasource while compaction is running, you need to enable concurrent append and replace for the datasource by updating the compaction settings.
+
+### Update compaction config from the Druid web-console
+
+In the **Compaction config** for a datasource, enable **Use concurrent locks**.
+
+For details on accessing the compaction config in the UI, see [Enable automatic compaction with the web console](../data-management/automatic-compaction.md#manage-auto-compaction-using-the-web-console).
+
+### Update compaction config using REST API
+
+Add the `taskContext` like you would any other automatic compaction setting through the API:
+
+```shell
+curl --location --request POST 'http://localhost:8081/druid/coordinator/v1/config/compaction' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "dataSource": "YOUR_DATASOURCE",
+ "taskContext": {
+ "useConcurrentLocks": true
+ }
+}'
+```
+
+## Use concurrent locks in ingestion jobs
+
+You also need to configure the ingestion job to allow concurrent locks.
+
+You can provide the context parameter like any other parameter for ingestion jobs through the API or the UI.
+
+### Use concurrent locks in the Druid web-console
+
+As part of the **Load data** wizard for classic batch (JSON-based) ingestion and streaming ingestion, enable the following config on the **Publish** step: **Use concurrent locks**.
+
+### Use concurrent locks in the REST APIs
+
+Add the following JSON snippet to your supervisor or ingestion spec if you're using the API:
+
+```json
+"context": {
+ "useConcurrentLocks": true
+}
+```
+
+## Update Overlord properties to use concurrent locks for all ingestion and compaction jobs
+
+Updating the compaction config and ingestion job for each data source can be cumbersome if you have several data sources in your cluster. You can instead set the following config in the `runtime.properties` of the Overlord service to use concurrent locks across all ingestion and compaction jobs.
+
+```bash
+druid.indexer.task.default.context={"useConcurrentLocks":true}
+```
+
+## Task lock types
+
+We recommend that you use the `useConcurrentLocks` context parameter so that Druid automatically determines the task lock types for you. If, for some reason, you need to manually set the task lock types explicitly, you can read more about them in this section.
+
+<details>
+<summary>Click here to read more about the lock types.</summary>
+
+Druid uses task locks to make sure that multiple conflicting operations don't happen at once.
+There are two task lock types: `APPEND` and `REPLACE`. The type of lock you use is determined by what you're trying to accomplish.
+
+When setting task lock types manually, be aware of the following:
+- The segment granularity of the append task must be equal to or finer than the segment granularity of the replace task.
+- Concurrent append and replace fails if the task with `APPEND` lock uses a coarser segment granularity than the task with the `REPLACE` lock. For example, if the `APPEND` task uses a segment granularity of YEAR and the `REPLACE` task uses a segment granularity of MONTH, you should not use concurrent append and replace.
+- Only a single task can hold a `REPLACE` lock on a given interval of a datasource.
+ - Multiple tasks can hold `APPEND` locks on a given interval of a datasource and append data to that interval simultaneously.
+
+#### Add a task lock type to your ingestion job
+
+You configure the task lock type for your ingestion job as follows:
+
+- For streaming jobs, the `taskLockType` context parameter goes in your supervisor spec, and the lock type is always `APPEND`.
+- For classic JSON-based batch ingestion, the `taskLockType` context parameter goes in your ingestion spec, and the lock type can be either `APPEND` or `REPLACE`.
+
+You can provide the context parameter through the API like any other parameter for ingestion job or through the UI.
+
+##### Add a task lock using the Druid console
+
+As part of the **Load data** wizard for classic batch (JSON-based ingestion) and streaming ingestion, you can configure the task lock type for the ingestion during the **Publish** step:
+
+- If you set **Append to existing** to **True**, you can then set **Allow concurrent append tasks (experimental)** to **True**.
+- If you set **Append to existing** to **False**, you can then set **Allow concurrent replace tasks (experimental)** to **True**.
+
+##### Add the task lock type through the API
+
+Add the following JSON snippet to your supervisor or ingestion spec if you're using the API:
+
+```json
+"context": {
+ "taskLockType": LOCK_TYPE
+}
+```
+
+The `LOCK_TYPE` depends on what you're trying to accomplish.
+
+Set `taskLockType` to `APPEND` if either of the following are true:
+
+- Dynamic partitioning with append to existing is set to `true`
+- The ingestion job is a streaming ingestion job
+
+If you have multiple ingestion jobs that append all targeting the same datasource and want them to run simultaneously, you need to also include the following context parameter:
+
+```json
+"useSharedLock": "true"
+```
+
+Keep in mind that `taskLockType` takes precedence over `useSharedLock`. Do not use `useSharedLock` with `REPLACE` task locks.
+
+
+Set `taskLockType` to `REPLACE` if you're replacing data. For example, if you use any of the following partitioning types, use `REPLACE`:
+
+- hash partitioning
+- range partitioning
+- dynamic partitioning with append to existing set to `false`
+
+</details>
+
+## Known limitations
+
+Do not use concurrent append and replace on a datasource if any one of the following is true:
+
+- The datasource has mixed granularity of data in any interval. For example, if an interval has both DAY and WEEK granularity data, using concurrent append and replace may result in data loss or duplication.
+- The datasource has a compaction config which compacts data into more granular chunks. For example, a datasource that has MONTH data ingested into it and is configured to compact it into DAY granularity might suffer data losses or duplication.
diff --git a/docs/latest/ingestion/data-formats.md b/docs/38.0.0/ingestion/data-formats.md
similarity index 97%
copy from docs/latest/ingestion/data-formats.md
copy to docs/38.0.0/ingestion/data-formats.md
index 9d833b4ef..303e3f718 100644
--- a/docs/latest/ingestion/data-formats.md
+++ b/docs/38.0.0/ingestion/data-formats.md
@@ -23,7 +23,7 @@ sidebar_label: Source input formats
~ under the License.
-->
-Apache Druid can ingest denormalized data in JSON, CSV, or a delimited form such as TSV, or any custom format. While most examples in the documentation use data in JSON format, it is not difficult to configure Druid to ingest any other delimited data.
+Apache® Druid can ingest denormalized data in JSON, CSV, or a delimited form such as TSV, or any custom format. While most examples in the documentation use data in JSON format, it is not difficult to configure Druid to ingest any other delimited data.
We welcome any contributions to new formats.
This page lists all default and core extension data formats supported by Druid.
@@ -564,7 +564,7 @@ For example:
### Kafka
The `kafka` input format lets you parse the Kafka metadata fields in addition to the Kafka payload value contents.
-It should only be used when ingesting from Apache Kafka.
+It should only be used when ingesting from Apache Kafka.
The `kafka` input format wraps around the payload parsing input format and augments the data it outputs with the Kafka event timestamp, topic name, event headers, and the key field that itself can be parsed using any available input format.
@@ -583,6 +583,8 @@ Configure the Kafka `inputFormat` as follows:
| `headerFormat` | Object | Specifies how to parse the Kafka headers. Supports String types. Because Kafka header values are bytes, the parser decodes them as UTF-8 encoded strings. To change this behavior, implement your own parser based on the encoding style. Change the `encoding` type in `KafkaStringHeaderFormat` to match your custom implementation. See [Header format](#header-format) for supported encoding formats.| no ||
| `keyFormat` | [InputFormat](#input-format) | The [input format](#input-format) to parse the Kafka key. It only processes the first entry of the `inputFormat` field. If your key values are simple strings, you can use the `tsv` format to parse them. Note that for `tsv`,`csv`, and `regex` formats, you need to provide a `columns` array to make a valid input format. Only the first one is used, and its name will be ignored in favor of `keyColumnName`. | no ||
| `keyColumnName` | String | The name of the column for the Kafka key.| no |`kafka.key`|
+| `partitionColumnName` | String | The name of the column for the Kafka partition number. | no | `kafka.partition` |
+| `offsetColumnName` | String | The name of the column for the Kafka record offset. Ingesting this column enables filtering by offset in `transformSpec`, which is useful for recovering data from a specific offset range. | no | `kafka.offset` |
#### Header format
@@ -604,6 +606,8 @@ For example, consider the following structure for a Kafka message that represent
- **Kafka timestamp**: `1680795276351`
- **Kafka topic**: `wiki-edits`
+- **Kafka partition**: `0`
+- **Kafka offset**: `12345`
- **Kafka headers**:
- `env=development`
- `zone=z1`
@@ -632,6 +636,8 @@ You would configure it as follows:
"columns": ["x"]
},
"keyColumnName": "kafka.key",
+ "partitionColumnName": "kafka.partition",
+ "offsetColumnName": "kafka.offset"
}
}
```
@@ -649,7 +655,9 @@ You would parse the example message as follows:
"kafka.topic": "wiki-edits",
"kafka.header.env": "development",
"kafka.header.zone": "z1",
- "kafka.key": "wiki-edit"
+ "kafka.key": "wiki-edit",
+ "kafka.partition": 0,
+ "kafka.offset": 12345
}
```
@@ -734,6 +742,8 @@ After Druid ingests the data, you can query the Kafka metadata columns as follow
SELECT
"kafka.header.env",
"kafka.key",
+ "kafka.partition",
+ "kafka.offset",
"kafka.timestamp",
"kafka.topic"
FROM "wikiticker"
@@ -741,9 +751,9 @@ FROM "wikiticker"
This query returns:
-| `kafka.header.env` | `kafka.key` | `kafka.timestamp` | `kafka.topic` |
-|--------------------|-----------|---------------|---------------|
-| `development` | `wiki-edit` | `1680795276351` | `wiki-edits` |
+| `kafka.header.env` | `kafka.key` | `kafka.partition` | `kafka.offset` | `kafka.timestamp` | `kafka.topic` |
+|--------------------|-----------|-------------------|----------------|---------------|---------------|
+| `development` |`wiki-edit`|`0`|`12345`| `1680795276351`| `wiki-edits` |
### Kinesis
diff --git a/docs/38.0.0/ingestion/faq.md b/docs/38.0.0/ingestion/faq.md
new file mode 100644
index 000000000..3fab83f0e
--- /dev/null
+++ b/docs/38.0.0/ingestion/faq.md
@@ -0,0 +1,80 @@
+---
+id: faq
+title: "Ingestion troubleshooting FAQ"
+sidebar_label: "Troubleshooting FAQ"
+---
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+## Batch Ingestion
+
+If you are trying to batch load historical data but no events are being loaded, make sure the interval of your ingestion spec actually encapsulates the interval of your data. Events outside this interval are dropped.
+
+## Druid ingested my events but they are not in my query results
+
+If the number of ingested events seem correct, make sure your query is correctly formed. If you included a `count` aggregator in your ingestion spec, you will need to query for the results of this aggregate with a `longSum` aggregator. Issuing a query with a count aggregator will count the number of Druid rows, which includes [roll-up](../design/index.md).
+
+## Where do my Druid segments end up after ingestion?
+
+Depending on what `druid.storage.type` is set to, Druid will upload segments to some [Deep Storage](../design/deep-storage.md). Local disk is used as the default deep storage.
+
+## My stream ingest is not handing segments off
+
+First, make sure there are no exceptions in the logs of the ingestion process. Also make sure that `druid.storage.type` is set to a deep storage that isn't `local` if you are running a distributed cluster.
+
+Other common reasons that hand-off fails are as follows:
+
+1) Druid is unable to write to the metadata storage. Make sure your configurations are correct.
+
+2) Historical processes are out of capacity and cannot download any more segments. You'll see exceptions in the Coordinator logs if this occurs and the web console will show the Historicals are near capacity.
+
+3) Segments are corrupt and cannot be downloaded. You'll see exceptions in your Historical processes if this occurs.
+
+4) Deep storage is improperly configured. Make sure that your segment actually exists in deep storage and that the Coordinator logs have no errors.
+
+## How do I know when I can make query to Druid after submitting batch ingestion task?
+
+You can verify if segments created by a recent ingestion task are loaded onto historicals and available for querying using the following workflow.
+1. Submit your ingestion task.
+2. Repeatedly poll the [Overlord's tasks API](../api-reference/tasks-api.md) ( `/druid/indexer/v1/task/{taskId}/status`) until your task is shown to be successfully completed.
+3. Poll the [Segment Loading by Datasource API](../api-reference/legacy-metadata-api.md#segment-loading-by-datasource) (`/druid/coordinator/v1/datasources/{dataSourceName}/loadstatus`) with
+`forceMetadataRefresh=true` and `interval=<INTERVAL_OF_INGESTED_DATA>` once.
+(Note: `forceMetadataRefresh=true` refreshes Coordinator's metadata cache of all datasources. This can be a heavy operation in terms of the load on the metadata store but is necessary to make sure that we verify all the latest segments' load status)
+If there are segments not yet loaded, continue to step 4, otherwise you can now query the data.
+4. Repeatedly poll the [Segment Loading by Datasource API](../api-reference/legacy-metadata-api.md#segment-loading-by-datasource) (`/druid/coordinator/v1/datasources/{dataSourceName}/loadstatus`) with
+`forceMetadataRefresh=false` and `interval=<INTERVAL_OF_INGESTED_DATA>`.
+Continue polling until all segments are loaded. Once all segments are loaded you can now query the data.
+Note that this workflow only guarantees that the segments are available at the time of the [Segment Loading by Datasource API](../api-reference/legacy-metadata-api.md#segment-loading-by-datasource) call. Segments can still become missing because of historical process failures or any other reasons afterward.
+
+## I don't see my Druid segments on my Historical processes
+
+You can check the [web console](../operations/web-console.md) to make sure that your segments have actually loaded on [Historical processes](../design/historical.md). If your segments are not present, check the Coordinator logs for messages about capacity of replication errors. One reason that segments are not downloaded is because Historical processes have maxSizes that are too small, making them incapable of downloading more data. You can change that with (for example):
+
+```
+-Ddruid.segmentCache.locations=[{"path":"/tmp/druid/storageLocation","maxSize":"500000000000"}]
+ ```
+
+## My queries are returning empty results
+
+You can use a [segment metadata query](../querying/segmentmetadataquery.md) for the dimensions and metrics that have been created for your datasource. Make sure that the name of the aggregators you use in your query match one of these metrics. Also make sure that the query interval you specify match a valid time range where data exists.
+
+## Real-time ingestion seems to be stuck
+
+There are a few ways this can occur. Druid will throttle ingestion to prevent out of memory problems if the intermediate persists are taking too long or if hand-off is taking too long. If your process logs indicate certain columns are taking a very long time to build (for example, if your segment granularity is hourly, but creating a single column takes 30 minutes), you should re-evaluate your configuration or scale up your real-time ingestion.
diff --git a/docs/latest/ingestion/hadoop.md b/docs/38.0.0/ingestion/hadoop.md
similarity index 88%
copy from docs/latest/ingestion/hadoop.md
copy to docs/38.0.0/ingestion/hadoop.md
index 35c4eb373..3ae6ada80 100644
--- a/docs/latest/ingestion/hadoop.md
+++ b/docs/38.0.0/ingestion/hadoop.md
@@ -23,11 +23,11 @@ sidebar_label: "Hadoop-based"
~ under the License.
-->
-Support for Apache Hadoop-based ingestion was removed from Apache Druid 37.0.0. Please use
+Support for ingestion using Apache® Hadoop was removed from Apache® Druid 37.0.0. Please use
[SQL-based ingestion](../multi-stage-query/index.md) or [native batch](../ingestion/native-batch.md) instead.
The associated `materialized-view-selection` and `materialized-view-maintenance` contrib extensions were also removed
as part of this since they only supported Hadoop based ingestion.
Note that Druid still supports using [`druid-hdfs-storage`](../development/extensions-core/hdfs.md) as deep storage and other Hadoop ecosystem extensions and
-functionality that was not specific to Hadoop-based ingestion.
+functionality that was not specific to ingestion using Hadoop.
diff --git a/docs/latest/ingestion/index.md b/docs/38.0.0/ingestion/index.md
similarity index 97%
copy from docs/latest/ingestion/index.md
copy to docs/38.0.0/ingestion/index.md
index 4d63fd640..cd8d95afd 100644
--- a/docs/latest/ingestion/index.md
+++ b/docs/38.0.0/ingestion/index.md
@@ -56,7 +56,7 @@ supervisor.
| **Method** | [Kafka](../ingestion/kafka-ingestion.md) | [Kinesis](../ingestion/kinesis-ingestion.md) |
|---|-----|--------------|
| **Supervisor type** | `kafka` | `kinesis`|
-| **How it works** | Druid reads directly from Apache Kafka. | Druid reads directly from Amazon Kinesis.|
+| **How it works** | Druid reads directly from Apache Kafka®. | Druid reads directly from Amazon Kinesis.|
| **Can ingest late data?** | Yes. | Yes. |
| **Exactly-once guarantees?** | Yes. | Yes. |
diff --git a/docs/latest/ingestion/ingestion-spec.md b/docs/38.0.0/ingestion/ingestion-spec.md
similarity index 98%
copy from docs/latest/ingestion/ingestion-spec.md
copy to docs/38.0.0/ingestion/ingestion-spec.md
index d1f901cc9..909549995 100644
--- a/docs/latest/ingestion/ingestion-spec.md
+++ b/docs/38.0.0/ingestion/ingestion-spec.md
@@ -188,9 +188,13 @@ Treat `__time` as a millisecond timestamp: the number of milliseconds since Jan
The `dimensionsSpec` is located in `dataSchema` → `dimensionsSpec` and is responsible for
configuring [dimensions](./schema-model.md#dimensions).
-You can either manually specify the dimensions or take advantage of schema auto-discovery where you allow Druid to infer all or some of the schema for your data. This means that you don't have to explicitly specify your dimensions and their type.
+You can either manually specify the dimensions or take advantage of type-aware schema auto-discovery where you allow Druid to infer all or some of the schema for your data. This means that you don't have to explicitly specify your dimensions and their type.
-To use schema auto-discovery, set `useSchemaDiscovery` to `true`.
+:::caution
+When using type-aware schema auto-discovery, Druid discovers the type for all dimensions unless you use the `dimensionExclusions` field to explicitly specify dimensions to ignore. This helps you control storage costs by preventing Druid from unintentionally ingesting dimensions.
+:::
+
+To use type-aware schema auto-discovery, set `useSchemaDiscovery` to `true`.
Alternatively, you can use the string-based schemaless ingestion where any discovered dimensions are treated as strings. To do so, leave `useSchemaDiscovery` set to `false` (default). Then, set the dimensions list to empty or set the `includeAllDimensions` property to `true`.
@@ -439,7 +443,7 @@ Projections you define become a dimension for your datasource. To remove a proje
## `ioConfig`
-The `ioConfig` influences how data is read from a source system, such as Apache Kafka, Amazon S3, a mounted
+The `ioConfig` influences how data is read from a source system, such as Apache Kafka®, Amazon S3, a mounted
filesystem, or any other supported source system. The `inputFormat` property applies to all
[ingestion method](./index.md#ingestion-methods).
The rest of `ioConfig` is specific to each individual ingestion method.
diff --git a/docs/latest/ingestion/input-sources.md b/docs/38.0.0/ingestion/input-sources.md
similarity index 99%
copy from docs/latest/ingestion/input-sources.md
copy to docs/38.0.0/ingestion/input-sources.md
index a74e61db5..05b019ef3 100644
--- a/docs/latest/ingestion/input-sources.md
+++ b/docs/38.0.0/ingestion/input-sources.md
@@ -23,7 +23,7 @@ sidebar_label: "Input sources"
~ under the License.
-->
-The input source defines where your index task reads data for Apache Druid native batch ingestion. Only the native parallel task and simple task support the input source.
+The input source defines where your index task reads data for Apache® Druid native batch ingestion. Only the native parallel task and simple task support the input source.
For general information on native batch indexing and parallel task indexing, see [Native batch ingestion](./native-batch.md).
@@ -564,7 +564,7 @@ Sample specs:
|Property|Description|Default|Required|
|--------|-----------|-------|---------|
|type|Set the value to `hdfs`.|None|yes|
-|paths|HDFS paths. Can be either a JSON array or comma-separated string of paths. Wildcards like `*` are supported in these paths. Empty files located under one of the given paths will be skipped.|None|yes|
+|paths|HDFS paths. Can be either a JSON array or comma-separated string of paths. Wildcards like `*` are supported in these paths.<br /><br />Empty files located under one of the given paths will be skipped. Hidden files and directories whose names start with `_` or `.` are automatically excluded.<br /><br />When a path points to a directory, only the immediate files in that directory are listed; subdirectories are not traversed. To ingest files from nested directories, use glob patterns [...]
|systemFields|JSON array of system fields to return as part of input rows. Possible values: `__file_uri` (URI) and `__file_path` (path component of URI).|None|no|
You can also ingest from other storage using the HDFS input source if the HDFS client supports that storage.
diff --git a/docs/latest/ingestion/kafka-ingestion.md b/docs/38.0.0/ingestion/kafka-ingestion.md
similarity index 81%
copy from docs/latest/ingestion/kafka-ingestion.md
copy to docs/38.0.0/ingestion/kafka-ingestion.md
index 2326b59d9..0441dde69 100644
--- a/docs/latest/ingestion/kafka-ingestion.md
+++ b/docs/38.0.0/ingestion/kafka-ingestion.md
@@ -25,7 +25,7 @@ description: "Overview of the Kafka indexing service for Druid. Includes example
-->
:::info
-To use the Kafka indexing service, you must be on Apache Kafka version 0.11.x or higher.
+To use the Kafka indexing service, you must be on Apache Kafka® version 0.11.x or higher.
If you are using an older version, refer to the [Apache Kafka upgrade guide](https://kafka.apache.org/documentation/#upgrade).
:::
@@ -156,9 +156,7 @@ Consumer properties control how a supervisor reads and processes event messages
You must include `bootstrap.servers` in consumer properties with a list of Kafka brokers in the format `<BROKER_1>:<PORT_1>,<BROKER_2>:<PORT_2>,...`.
In some cases, you may need to retrieve consumer properties at runtime. For example, when `bootstrap.servers` is unknown or not static.
-The `isolation.level` property in `consumerProperties` determines how Druid reads messages written transactionally.
-With `read_committed`, which is the default in Druid, only committed transactions are read.
-If you use older versions of Kafka without transaction support, or you want to read even aborted transactions, set `isolation.level` to `read_uncommitted`.
+The `isolation.level` property determines how Druid handles transactional Kafka messages. Although standard Kafka consumers default to `read_uncommitted`, Druid's ingestion engine defaults to `read_committed`. This ensures that only finalized data is indexed and aborted transactions are ignored. If you need to use legacy Kafka brokers or don’t want Druid to consume only committed transactions, explicitly set `isolation.level` to `read_uncommitted`. Note that using `read_uncommitted` remo [...]
If your Kafka cluster enables consumer group ACLs, you can set `group.id` in `consumerProperties` to override the default auto generated group ID.
... 14691 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org