-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] 28.0.0 release notes #15326
Comments
# Upgrade notes and incompatible changes# Upgrade notes# Upgrade Druid segments tableDruid 28.0.0 adds a new column to the Druid metadata table that requires an update to the table. If If either of those requirements are not met, pre-upgrade steps are required. You must make these updates before you upgrade to Druid 28.0.0, or the Coordinator and Overlord processes fail. Although you can manually alter your table to add the new In the example commands below:
# Upgrade step for MySQLcd ${DRUID_ROOT}
java -classpath "lib/*" -Dlog4j.configurationFile=conf/druid/cluster/_common/log4j2.xml -Ddruid.extensions.directory="extensions" -Ddruid.extensions.loadList=[\"mysql-metadata-storage\"] -Ddruid.metadata.storage.type=mysql org.apache.druid.cli.Main tools metadata-update --connectURI="<mysql-uri>" --user USER --password PASSWORD --base druid --action add-used-flag-last-updated-to-segments # Upgrade step for PostgreSQLcd ${DRUID_ROOT}
java -classpath "lib/*" -Dlog4j.configurationFile=conf/druid/cluster/_common/log4j2.xml -Ddruid.extensions.directory="extensions" -Ddruid.extensions.loadList=[\"postgresql-metadata-storage\"] -Ddruid.metadata.storage.type=postgresql org.apache.druid.cli.Main tools metadata-update --connectURI="<postgresql-uri>" --user USER --password PASSWORD --base druid --action add-used-flag-last-updated-to-segments # Manual upgrade stepALTER TABLE druid_segments
ADD used_flag_last_updated varchar(255); # Recommended syntax for SQL UNNESTThe recommended syntax for SQL UNNEST has changed. We recommend using CROSS JOIN instead of commas for most queries to prevent issues with precedence. For example, use: SELECT column_alias_name1 FROM datasource CROSS JOIN UNNEST(source_expression1) AS table_alias_name1(column_alias_name1) CROSS JOIN UNNEST(source_expression2) AS table_alias_name2(column_alias_name2), ... Do not use: SELECT column_alias_name FROM datasource, UNNEST(source_expression1) AS table_alias_name1(column_alias_name1), UNNEST(source_expression2) AS table_alias_name2(column_alias_name2), ... # Dynamic parametersThe Apache Calcite version has been upgraded from 1.21 to 1.35. As part of the Calcite upgrade, the behavior of type inference for dynamic parameters has changed. To avoid any type interference issues, explicitly SELECT (1 * CAST (? as DOUBLE))/2 as tmp Do not use: SELECT (1 * ?)/2 as tmp # Nested column format
When upgrading from a previous version, you can continue to write nested columns in a backwards compatible format (version 4). In a classic batch ingestion job, include "dimensionsSpec": {
"dimensions": [
"product",
"department",
{
"type": "json",
"name": "shipTo",
"formatVersion": 4
}
]
}, To set the default nested column version, set the desired format version in the common runtime properties. For example: druid.indexing.formats.nestedColumnFormatVersion=4 # SQL compatibilityStarting with Druid 28.0.0, the default way Druid treats nulls and booleans has changed. For nulls, Druid now differentiates between an empty string and a record with no data as well as between an empty numerical record and This property affects both storage and querying, and must be set on all Druid service types to be available at both ingestion time and query time. Reverting this setting to the old value restores the previous behavior without reingestion. For booleans, Druid now strictly uses You can revert to the previous behavior by setting The following table illustrates some example scenarios and the impact of the changes. Show the table
Before upgrading to Druid 28.0.0, update your queries to account for the changed behavior as described in the following sections. # NULL filtersIf your queries use NULL in the filter condition to match both nulls and empty strings, you should add an explicit filter clause for empty strings. For example, update # COUNT functions
# GroupBy queriesGroupBy queries on columns containing null values can now have additional entries as nulls can co-exist with empty strings. # Stop Supervisors that ingest from multiple Kafka topics before downgradingIf you have added supervisors that ingest from multiple Kafka topics in Druid 28.0.0 or later, stop those supervisors before downgrading to a version prior to Druid 28.0.0 because the supervisors will fail in versions prior to Druid 28.0.0. #
|
@LakshSingla can we close this now that 28 has been released? |
Apache Druid 28.0.0 contains over 420 new features, bug fixes, performance enhancements, documentation improvements, and additional test coverage from 57 contributors.
See the complete set of changes for additional details, including bug fixes.
Review the upgrade notes and incompatible changes before you upgrade to Druid 28.0.0.
# Important features, changes, and deprecations
In Druid 28.0.0, we have made substantial improvements to querying to make the system more ANSI SQL compatible. This includes changes in handling NULL and boolean values as well as boolean logic. At the same time, the Apache Calcite library has been upgraded to the latest version. While we have documented known query behavior changes, please read the upgrade notes section carefully. Test your application before rolling out to broad production scenarios while closely monitoring the query status.
# SQL compatibility
Druid continues to make SQL query execution more consistent with how standard SQL behaves. However, there are feature flags available to restore the old behavior if needed.
# Three-valued logic
Druid native filters now observe SQL three-valued logic (
true
,false
, orunknown
) instead of Druid's classic two-state logic by default, when the following default settings apply:druid.generic.useThreeValueLogicForNativeFilters = true
druid.expressions.useStrictBooleans = true
druid.generic.useDefaultValueForNull = false
#15058
# Strict booleans
druid.expressions.useStrictBooleans
is now enabled by default.Druid now handles booleans strictly using
1
(true) or0
(false).Previously, true and false could be represented either as
true
andfalse
as well as1
and0
, respectively.In addition, Druid now returns a null value for Boolean comparisons like
True && NULL
.If you don't explicitly configure this property in
runtime.properties
, clusters now use LONG types for any ingested boolean values and in the output of boolean functions for transformations and query time operations.For more information, see SQL compatibility in the upgrade notes.
#14734
# NULL handling
druid.generic.useDefaultValueForNull
is now disabled by default.Druid now differentiates between empty records and null records.
Previously, Druid might treat empty records as empty or null.
For more information, see SQL compatibility in the upgrade notes.
#14792
# SQL planner improvements
Druid uses Apache Calcite for SQL planning and optimization. Starting in Druid 28.0.0, the Calcite version has been upgraded from 1.21 to 1.35. This upgrade brings in many bug fixes in SQL planning from Calcite.
# Dynamic parameters
As part of the Calcite upgrade, the behavior of type inference for dynamic parameters has changed. To avoid any type interference issues, explicitly
CAST
all dynamic parameters as a specific data type in SQL queries. For example, use:Do not use:
# Async query and query from deep storage
Query from deep storage is no longer an experimental feature. When you query from deep storage, more data is available for queries without having to scale your Historical services to accommodate more data. To benefit from the space saving that query from deep storage offers, configure your load rules to unload data from your Historical services.
# Support for multiple result formats
Query from deep storage now supports multiple result formats.
Previously, the
/druid/v2/sql/statements/
endpoint only supported results in theobject
format. Now, results can be written in any format specified in theresultFormat
parameter.For more information on result parameters supported by the Druid SQL API, see Responses.
#14571
# Broadened access for queries from deep storage
Users with the
STATE
permission can interact with status APIs for queries from deep storage. Previously, only the user who submitted the query could use those APIs. This enables the web console to monitor the running status of the queries. Users with theSTATE
permission can access the query results.#14944
# MSQ queries for realtime tasks
The MSQ task engine can now include real time segments in query results. To do this, use the
includeSegmentSource
context parameter and set it toREALTIME
.#15024
# MSQ support for UNION ALL queries
You can now use the MSQ task engine to run UNION ALL queries with
UnionDataSource
.#14981
# Ingest from multiple Kafka topics to a single datasource
You can now ingest streaming data from multiple Kafka topics to a datasource using a single supervisor.
You configure the topics for the supervisor spec using a regex pattern as the value for
topicPattern
in the IO config. If you add new topics to Kafka that match the regex, Druid automatically starts ingesting from those new topics.If you enable multi-topic ingestion for a datasource, downgrading will cause the Supervisor to fail.
For more information, see Stop supervisors that ingest from multiple Kafka topics before downgrading.
#14424
#14865
# SQL UNNEST and ingestion flattening
The UNNEST function is no longer experimental.
Druid now supports UNNEST in SQL-based batch ingestion and query from deep storage, so you can flatten arrays easily. For more information, see UNNEST and Unnest arrays within a column.
You no longer need to include the context parameter
enableUnnest: true
to use UNNEST.#14886
# Recommended syntax for SQL UNNEST
The recommended syntax for SQL UNNEST has changed. We recommend using CROSS JOIN instead of commas for most queries to prevent issues with precedence. For example, use:
Do not use:
# Window functions (experimental)
You can use window functions in Apache Druid to produce values based upon the relationship of one row within a window of rows to the other rows within the same window. A window is a group of related rows within a result set. For example, rows with the same value for a specific dimension.
Enable window functions in your query with the
enableWindowing: true
context parameter.#15184
# Concurrent append and replace (experimental)
Druid 28.0.0 adds experimental support for concurrent append and replace.
This feature allows you to safely replace 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 is appending new data to an interval while compaction of that interval is already in progress.
For more information, see Concurrent append and replace.
Segment locking will be deprecated and removed in favor of concurrent append and replace that is much simpler in design. With concurrent append and replace, Druid doesn't lock compaction jobs out because of active realtime ingestion.
# Task locks for append and replace batch ingestion jobs
Append batch ingestion jobs can now share locks. This allows you to run multiple append batch ingestion jobs against the same time internal. Replace batch ingestion jobs still require an exclusive lock. This means you can run multiple append batch ingestion jobs and one replace batch ingestion job for a given interval.
#14407
# Streaming ingestion with concurrent replace
Streaming jobs reading from Kafka and Kinesis with
APPEND
locks can now ingest concurrently with compaction running withREPLACE
locks. The segment granularity of the streaming job must be equal to or finer than that of the concurrent replace job.#15039
# Functional area and related changes
This section contains detailed release notes separated by areas.
# Web console
# Added UI support for segment loading query context parameter
The web console supports the
waitUntilSegmentsLoad
query context parameter.#15110
# Added concurrent append and replace switches
The web console includes concurrent append and replace switches.
The following screenshot shows the concurrent append and replace switches in the classic batch ingestion wizard:
The following screenshot shows the concurrent append and replace switches in the compaction configuration UI:
#15114
# Added UI support for ingesting from multiple Kafka topics to a single datasource
The web console supports ingesting streaming data from multiple Kafka topics to a datasource using a single supervisor.
#14833
# Other web console improvements
query_controller
tasks in the task view instead of the generic raw task details dialog. You can still access the raw task details from the ellipsis (...) menu #14930)# Ingestion
# JSON and auto column indexer
The
json
column type is now equivalent to usingauto
in JSON-based batch ingestion dimension specs. Upgrade your ingestion specs tojson
to take advantage of the features and functionality ofauto
, including the following:json
type columns created with Druid 28.0.0 are not backwards compatible with Druid versions older than 26.0.0.If you upgrade from one of these versions, you can continue to write nested columns in a backwards compatible format (version 4).
For more information, see Nested column format in the upgrade notes.
#14955
#14456
# Ingestion status
Ingestion reports now include a
segmentLoadStatus
object that provides information related to the ingestion, such as duration and total segments.#14322
# SQL-based ingestion
# Ability to ingest ARRAY types
SQL-based ingestion now supports storing ARRAY typed values in ARRAY typed columns as well as storing both VARCHAR and numeric typed arrays.
Previously, the MSQ task engine stored ARRAY typed values as multi-value dimensions instead of ARRAY typed columns.
The MSQ task engine now includes the
arrayIngestMode
query context parameter, which controls howARRAY
types are stored in Druid segments.Set the
arrayIngestMode
query context parameter toarray
to ingest ARRAY types.In Druid 28.0.0, the default mode for
arrayIngestMode
ismvd
for backwards compatibility, which only supports VARCHAR typed arrays and stores them as multi-value dimensions. This default is subject to change in future releases.For information on how to migrate to the new behavior, see the Ingestion options for ARRAY typed columns in the upgrade notes.
For information on inserting, filtering, and grouping behavior for
ARRAY
typed columns, see Array columns.#15093
# Numeric array type support
Row-based frames and, by extension, the MSQ task engine now support numeric array types. This means that all queries consuming or producing arrays work with the MSQ task engine. Numeric arrays can also be ingested using SQL-based ingestion with MSQ. For example, queries like
SELECT [1, 2]
are valid now since they consume a numeric array instead of failing with an unsupported column type exception.#14900
# Azure Blob Storage support
Added support for Microsoft Azure Blob Storage.
You can now use fault tolerance and durable storage with Microsoft Azure Blob Storage.
For more information, see Durable storage.
#14660
# Other SQL-based ingestion improvements
rowsPerPage
context parameter for the MSQ task engine.Use
rowsPerPage
to limit the number of rows per page. For more information on context parameters for the MSQ task engine, see Context parameters #14994ServiceClosedException
onpostCounters
while the controller is offline #14707# Streaming ingestion
# Ability to reset offsets for a supervisor
Added a new API endpoint
/druid/indexer/v1/supervisor/:supervisorId/resetOffsets
to reset specific partition offsets for a supervisor without resetting the entire set.This endpoint clears only the specified offsets in Kafka or sequence numbers in Kinesis, prompting the supervisor to resume data reading.
#14772
# Other streaming ingestion improvements
PropertyNamingStrategies
from Jackson to fix Hadoop ingestion and make it compatible with newer Jackson #14671TaskLocation
object for Kubernetes task scheduling to make debugging easier #14758KubernetesTaskRunner
#14790SqlStatementResource
andSqlTaskResource
to set request attribute #14878DeterminePartitionsJob
#13840usedClusterCapacity
to theGET
/totalWorkerCapacity
response. Use this API to get the total ingestion capacity on the overlord #14888task/pending/time
metrics for Kubernetes-based ingestion #14698k8s/peon/startup/time
metrics for Kubernetes-based ingestion #14771handoffConditionTimeout
now defaults to 15 minutes—the default change won't affect existing supervisors #14539objects.toString
as a result of transform expressions #15127PodTemplateTaskAdapter
now accounts for queryable tasks #14789taskDuration
#14396deleteObjects
requests are now retried if the failure state allows retry #14776# Querying
# Improved LOOKUP function
The LOOKUP function now accepts an optional constant string as a third argument. This string is used to replace missing values in results. For example, the query
LOOKUP(store, 'store_to_country', 'NA')
, returnsNA
if thestore_to_country
value is missing for a givenstore
.#14956
# AVG function
The AVG aggregation function now returns a
double
instead of along
.#15089
# Improvements to EARLIEST and LATEST operators
Improved EARLIEST and LATEST operators as follows:
__time
column reference explicit to Calcite. #15095maxBytesPerValue
parameter.If you omit the
maxBytesPerValue
parameter, the aggregations default to 1024 bytes for the buffer. #14848# Functions for evaluating distinctness
New SQL and native query functions allow you to evaluate whether two expressions are distinct or not distinct.
Expressions are distinct if they have different values or if one of them is NULL.
Expressions are not distinct if their values are the same or if both of them are NULL.
Because the functions treat NULLs as known values when used as a comparison operator, they always return true or false even if one or both expressions are NULL.
The following table shows the difference in behavior between the equals sign (=) and IS [NOT] DISTINCT FROM:
#14976
# Functions for evaluating equalities
New SQL and native query functions allow you to evaluate whether a condition is true or false. These functions are different from
x == true
andx != true
in that they never return null even when the variable is null.IS_TRUE
istrue()
IS_FALSE
isfalse()
IS_NOT_TRUE
nottrue()
IS_NOT_FALSE
notfalse()
#14977
# Function to decode Base64-encoded strings
The new SQL and native query function,
decode_base64_utf8
decodes a Base64-encoded string and returns the UTF-8-encoded string. For example,decode_base64_utf8('aGVsbG8=')
.#14943
# Improved subquery guardrail
You can now set the
maxSubqueryBytes
guardrail to one of the following:disabled
: Default setting. Druid doesn't apply the guardrail around the number of bytes a subquery can generate.auto
: Druid calculates the amount of memory to use for the materialization of results as a portion of the fixed memory of the heap.In the query context, Druid uses the following formula to determine the upper limit on the number of bytes a subquery can generate:
INTEGER: The number of bytes to use for materializing subquery results. Set a specific value if you understand the query patterns and want to optimize memory usage.
For example, set the
maxSubqueryBytes
parameter to 300000000 (300 * 1000 * 1000
) for a 300 MB limit.Set the
maxSubqueryBytes
parameter to 314572800 (300 * 1024 * 1024
) for a 300 MiB limit.#14808
# Other query improvements
# Cluster management
# Unused segments
Druid now stops loading and moving segments as soon as they are marked as unused. This prevents Historical processes from spending time on superfluous loads of segments that will be unloaded later. You can mark segments as unused by a drop rule, overshadowing, or by calling the Data management API.
#14644
# Encrypt data in transit
The
net.spy.memcached
client has been replaced with the AWS ElastiCache client. This change allows Druid to encrypt data in transit using TLS.Configure it with the following properties:
druid.cache.enableTls
druid.cache.clientMode
druid.cache.skipTlsHostnameVerification
#14827
# New metadata in the Druid segments table
The Druid segments table now has a column called
used_flag_last_updated
(VARCHAR (255)). This column is a UTC date string corresponding to the last time that the used column was modified.Note that this is an incompatible change to the table. For upgrade information, see Upgrade Druid segments table.
#12599
# Other cluster management improvements
replicationThrottleLimit
used for smart segment loading has been increased from 2% to 5% of total number of used segments. The total number of replicas in the load queue at the start of a run plus the replicas assigned in a run is kept less than or equal to the throttle limit #14913balancerComputeThreads
is now calculated based on the number of CPUs divided by 2. Previously, the value was1
. Smart segment loading uses this computed value #14902InvalidNullByteFault
errors. They now include the output column name instead of the query column name for ease of use #14780DruidLeaderClient
doesn't find leader node #14775sys.tasks
metadata table and web console now show the Kubernetes pod name rather than the peon location when using Middle Manager-less ingestion #14959WorkerTaskRunners
that use Middle Managers #14918IndexingServiceDuties
andMetadataStoreManagementDuties
anymore. These are meant to be core coordinator built-in flows and should not be affected by custom duties. Users can still define aCustomCoordinatorDuty
with a custom duty group and period #14891balancerComputeThreads
andmaxSegmentsToMove
automatically based on usage skew between the Historical processes in a tier #14584druid.coordinator.compaction.skipLockedIntervals
because it should always betrue
#14807# Data management
# Alert message for segment assignments
Improved alert message for segment assignments when an invalid tier is specified in a load rule or when no rule applies on a segment.
#14696
# Coordinator API for unused segments
Added
includeUnused
as an optional parameter to the Coordinator API.You can send a
GET
request to/druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}?includeUnused=true
to retrieve the metadata for a specific segment as stored in the metadata store.The API also returns unused segments if the
includeUnused
parameter is set.#14846
# Kill task improvements
killTaskSlotRatio
andmaxKillTaskSlots
dynamic configuration properties to allow control of task resource usage spawned by theKillUnusedSegments
coordinator task #14769druid.coordinator.kill.period
can now be greater than or equal todruid.coordinator.period.indexingPeriod
. Previously, it had to be greater thandruid.coordinator.period.indexingPeriod
. Additionally, the leader Coordinator now keeps track of the last submittedkill
task for a datasource to avoid submitting duplicatekill
tasks #14831druid.coordinator.kill.bufferPeriod
for a buffer period. This config defines the amount of time that a segment is unused beforeKillUnusedSegment
can kill it. Using the defaultPT24H
, if you mark a segment as unused at2022-06-01T00:05:00.000Z
, then the segment cannot be killed until at or after2022-06-02T00:05:00.000Z
#12599kill
task:batchSize
: The maximum number of segments to delete in onekill
batch #14642limit
: The maximum number of segments for akill
task to delete #14662kill
tasks by batch deleting multiple segments stored in S3 #14131numSegmentsKilled
,numBatchesProcessed
, andnumSegmentsMarkedAsUnused
#15023IndexerSQLMetadataStorageCoordinator
now uses the JDBIPreparedBatch
instead of issuing single update statements inside a transaction to mitigate scaling challenges #14639# Metrics and monitoring
# New ingestion metrics
ingest/input/bytes
dataSource
,taskId
,taskType
,groupId
,tags
#14582
# New query metrics
mergeBuffer/pendingRequests
QueryCountStatsMonitor
module for the Broker.#15025
# New ZooKeeper metrics
zk/connected
1
for connected,0
for disconnected. Emitted once per monitor period.zk/reconnect/time
#14333
# New subquery metrics for the Broker
The new
SubqueryCountStatsMonitor
emits metrics corresponding to the subqueries and their execution.subquery/rowLimit/count
SubqueryCountStatsMonitor
module is included.subquery/byteLimit/count
SubqueryCountStatsMonitor
module is included.subquery/fallback/count
SubqueryCountStatsMonitor
module is included.subquery/fallback/insufficientType/count
SubqueryCountStatsMonitor
module is included.subquery/fallback/unknownReason/count
SubqueryCountStatsMonitor
module is included.query/rowLimit/exceeded/count
SubqueryCountStatsMonitor
module is included.query/byteLimit/exceeded/count
SubqueryCountStatsMonitor
module is included.#14808
# New Coordinator metrics
killTask/availableSlot/count
killTask/maxSlot/count
kill/task/count
kill/pendingSegments/count
dataSource
#14782
#14951
# New compaction metrics
compact/segmentAnalyzer/fetchAndProcessMillis
dataSource
,taskId
,taskType
,groupId
,tags
#14752
# Segment scan metrics
Added a new metric to figure out the usage of
druid.processing.numThreads
on the Historicals/Indexers/Peons.segment/scan/active
druid.processing.numThreads
are currently being used.druid.processing.numThreads
# New Kafka consumer metrics
Added the following Kafka consumer metrics:
kafka/consumer/bytesConsumed
: Equivalent to the Kafka consumer metricbytes-consumed-total
. Only emitted for Kafka tasks.kafka/consumer/recordsConsumed
: Equivalent to the Kafka consumer metricrecords-consumed-total
. Only emitted for Kafka tasks.#14582
# service/heartbeat metrics
service/heartbeat
metric tostatsd-reporter
#14564service/heartbeat
metric to expose theleader
dimension #14593# Tombstone and segment counts
Added
ingest/tombstones/count
andingest/segments/count
metrics in MSQ to report the number of tombstones and segments after Druid finishes publishing segments.#14980
# Extensions
# Ingestion task payloads for Kubernetes
You can now provide compressed task payloads larger than 128 KB when you run MiddleManager-less ingestion jobs.
#14887
# Prometheus emitter
The Prometheus emitter now supports a new optional configuration parameter,
druid.emitter.prometheus.extraLabels
.This addition offers the flexibility to add arbitrary extra labels to Prometheus metrics, providing more granular control in managing and identifying data across multiple Druid clusters or other dimensions.
For more information, see Prometheus emitter extension.
#14728
# Documentation improvements
We've moved Jupyter notebooks that guide you through query, ingestion, and data management with Apache Druid to the new Learn Druid repository.
The repository also contains a Docker Compose file to get you up and running with a learning lab.
#15136
The text was updated successfully, but these errors were encountered: