Commit Graph

14632 Commits

Author SHA1 Message Date
Adithya Chakilam c1d6328249
StreamingTaskRunner: Close the rejection period updater executor service (#17490) 2024-11-19 12:49:20 -08:00
zachjsh 8853c7e5c6
Add `ingest/notices/queueSize` and `ingest/pause/time` to statsd emitter (#17487)
* SQL syntax error should target USER persona

* * revert change to queryHandler and related tests, based on review comments

* * add test

* * add `ingest/notices/queueSize` and `ingest/pause/time` to statsd emitter

* * add taskStatus dimension to `service/heartbeat` metric

* Revert "* add taskStatus dimension to `service/heartbeat` metric"

This reverts commit cfb02a2813.
2024-11-18 20:58:00 -05:00
Adithya Chakilam 6f436301be
supervisor: make rejection periods work with stopTasksCount (#17442)
* kafka-indexing: Report consumer io time

* commit

* backward

* tests

* remove unwanted changes

* comments

* comments

* coverage

* change name

* fixes

* fixes

* comments
2024-11-18 13:12:24 -08:00
Clint Wylie 24a1fafaa7
projection segment merge fixes (#17460)
changes:
* fix issue when merging projections from multiple-incremental persists which was hoping that some 'dim conversion' buffers were not closed, but they already were (by the merging iterator). fix involves selectively persisting these conversion buffers to temp files in the segment write out directory and mapping them and tying them to the segment level closer so that they are available after the lifetime of the parent merger
* modify auto column serializers to use segment write out directory for temp files instead of java.io.tmpdir
* fix queryable index projection to not put the time-like column as a dimension, instead only adding it as __time
* use smoosh for temp files so can safely write any Serializer to a temp smoosh
2024-11-15 16:46:04 -08:00
Rishabh Singh 7f335ff486
Resolve CVEs: Upgrade jetty version and suppress azure cve (#17385) 2024-11-15 10:55:02 +05:30
Katya Macedo 75d9ece665
Docs: update descriptions and default values (#17473) 2024-11-13 16:29:27 -08:00
zachjsh b0c73d7c2a
Add 'ingest/notices/time' metric to statsd emitter (#17468)
* SQL syntax error should target USER persona

* * revert change to queryHandler and related tests, based on review comments

* * add test

* Add 'ingest/notices/time' metric to statsd emitter

This metric gives the milliseconds taken to process a notice by the supervisor.
2024-11-13 12:17:01 -05:00
Akshat Jain 390c2d68c8
Remove `intellij-inspections` check from CI (#17469) 2024-11-13 18:58:17 +05:30
Kiran Gadhave 1dbd005df6
updated docs with behavior for empty collections in pod template selector config (#17464) 2024-11-12 13:21:27 -08:00
zachjsh 1f3b1f85f9
Add documentation for Druids catalog extension (#17459)
* SQL syntax error should target USER persona

* * revert change to queryHandler and related tests, based on review comments

* * add test

* Add documentation for druid-catalog extension

* * fix error

* * fix error

* Apply suggestions from code review

Co-authored-by: Andreas Maechler <amaechler@gmail.com>

* * fix spelling error

* * fix spelling

---------

Co-authored-by: Andreas Maechler <amaechler@gmail.com>
2024-11-12 14:50:55 -05:00
Zoltan Haindrich f296102f05
ScanQuery should not ignore columnTypes in equals/hashCode (#17463)
* ScanQuery: equals/hashCode/toString
* DruidQuery: changes of Align ScanQuery column order with its desired signature #17457
* ScanQueryTest: add equalsverifer test
2024-11-12 14:26:59 +05:30
Akshat Jain c571e6905d
Refactor WindowOperatorQueryKit to use WindowStage class for representing different window stages (#17158) 2024-11-12 14:18:16 +05:30
Virushade 8278a1f7df
Fix Javadocs in ColumnCapablities.java (#17462) 2024-11-12 11:30:33 +05:30
Akshat Jain 3f56b57c7e
MSQ WF: Pass a flag from broker to determine operator chain transformation (#17443) 2024-11-12 09:28:28 +05:30
Shekhar Prasad Rajak ae049a4bab
AWS Glue Catalog for Iceberg ingest extension (#17392)
* iceberg glue catalog dependencies added

* GlueIcebergCatalog added in druid module

* default version of iceberg glue catalog implementation - basics

* basic tests added

* removed dependecy iceberg-aws-bundle

* glue catalog support - docs update for iceberg

* Update IcebergDruidModule.java

* Update IcebergDruidModule.java

* updates in dependencies and warehousePath must be under catalogProp

* removed some dependencies - which not required

* only glue sdk added

* update license

* avro exclusion removed

* doc update

* doc update

* set the type to glue

* minor change

* minor change

* fixing codestyle

* checkstyle fixes

* checkstyle fixes

* checkstyle fixes

* dependency check fixes

* update pom for ignore warning for glue catalog

* compile scope needed - iceberg-aws and awssdk

* updates pom with comment

* minor change

* mvn dependency check in iceberg extension

* revert pom.xml changes

* aws sdk sts and s3 for gluecatalog initialize

* dependency check - ignore aws sdk s3 and sts

---------

Co-authored-by: SHEKHAR PRASAD RAJAK <shekhar_rajak@apple.com>
2024-11-10 18:43:55 -08:00
jtuglu-netflix f906d0d446
Fix query failed metric double count bug (#17454) 2024-11-08 23:15:03 -08:00
Vivek Dhiman 0dcc2bc469
Fixed NPE in `array_overlap` and `array_contains`. (#17465) 2024-11-08 20:39:14 -08:00
George Shiqi Wu 5764183d4e
k8s-based-ingestion: Wait for task lifecycles to enter RUNNING state before returning from KubernetesTaskRunner.start (#17446)
* Add a wait on start() for task lifecycle to go into running

* handle exceptions

* Fix logging messages

* Don't pass in the settable future as a arg

* add some unit tests
2024-11-08 11:13:35 -05:00
Gian Merlino d8162163c8
Run JDK 21 workflows with 21.0.4. (#17458)
* Run JDK 21 workflows with 21.0.4.

To work around #17429, run our JDK 21 workflows with
version 21.0.4. It does not appear to have this problem.

* Undo changes in standard-its.yml

* Add comments.

---------

Co-authored-by: Zoltan Haindrich <kirk@rxd.hu>
2024-11-07 10:53:52 -08:00
Nandini Anagondi 32394e55f9
Upgrading org.codehaus to com.fasterxml (#17371) 2024-11-07 10:55:47 +01:00
Akshat Jain 73cbce9109
WindowOperatorQueryFrameProcessorFactory: Pass QueryContext instead of WindowOperatorQuery to WindowOperatorQueryFrameProcessor (#17405)
* WindowOperatorQueryKit: Pass QueryContext instead of WindowOperatorQuery to subsequent layers

* Add serializer for QueryContext class

* Revert changes of WindowOperatorQueryFrameProcessorFactory json param

* Fix checkstyle

* Address review comment: Remove older method in favor of calling new method inline
2024-11-07 11:29:49 +05:30
Gian Merlino 9c25226e06
QueryableIndexSegment: Re-use time boundary inspector. (#17397)
This patch re-uses timeBoundaryInspector for each cursor holder, which
enables caching of minDataTimestamp and maxDataTimestamp.

Fixes a performance regression introduced in #16533, where these fields
stopped being cached across cursors. Prior to that patch, they were
cached in the QueryableIndexStorageAdapter.
2024-11-06 09:27:59 -08:00
Abhishek Radhakrishnan d8e4be654f
ManageLifecycle DropwizardEmitter instantiation. (#17451) 2024-11-05 18:57:22 -08:00
George Shiqi Wu 8850023811
Fix error where communication failures to k8s can lead to stuck tasks (#17431)
* Fix save logs error

* Update extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/common/KubernetesPeonClient.java

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>

* make things final

* fix merge conflicts

---------

Co-authored-by: Kashif Faraz <kashif.faraz@gmail.com>
2024-11-05 09:58:30 -08:00
Zoltan Haindrich 2eac8318f8
Support Union in Decoupled planning (#17354)
* introduces `UnionQuery`
* some changes to enable a `UnionQuery` to have multiple input datasources
* `UnionQuery` execution is driven by the `QueryLogic` - which could later enable to reduce some complexity in `ClientQuerySegmentWalker`
* to run the subqueries of `UnionQuery` there was a need to access the `conglomerate` from the `Runner`; to enable that some refactors were done
* renamed `UnionQueryRunner` to `UnionDataSourceQueryRunner`
* `QueryRunnerFactoryConglomerate` have taken the place of `QueryToolChestWarehouse` which shaves of some unnecessary things here and there
* small cleanup/refactors
2024-11-05 16:58:57 +01:00
Virushade ba76264244
Update build documentation (#17444)
Add build instructions for developers
Follow up from issue #17375, add instructions solely for distribution profile. Note that this build command is mostly used by me, everyone is welcome to add further optimizations for a faster distribution build.

Co-authored-by: Abhishek Radhakrishnan <abhishek.rb19@gmail.com>

* Update docs/development/build.md

Co-authored-by: Abhishek Radhakrishnan <abhishek.rb19@gmail.com>

* Update docs/development/build.md

Co-authored-by: Abhishek Radhakrishnan <abhishek.rb19@gmail.com>

---------

Co-authored-by: Abhishek Radhakrishnan <abhishek.rb19@gmail.com>
2024-11-04 18:31:46 -08:00
Tom e4cdbca23c
make planner errors be user persona (#17437)
Change the persona for errors within the planner from Admin to User. The ADMIN persona is meant to be "a persona who is interacting with admin APIs and understands Druid query concepts". This isn't an admin API, it's a query API. Low quality error messages being returned to the correct audience is better than hiding all error messages.

The errors that can be returned back can be user solvable, and other times requires a druid expert. But the errors do not leak information that should only be seen by more expert/privileged personas.

The original ADMIN persona showed some reticence to tag low-quality error messages with a USER persona. but it really does seem user-directed to me so USER to me would make sense.
2024-11-04 10:48:35 -08:00
Kiran Gadhave 5fcf4205e4
Handle empty values for task and datasource conditions in pod template selector (#17400)
* handling empty sets for dataSourceCondition and taskTypeCondition

* using new HashSet<>() to fix forbidden api error in testCheck

* fixing style issues
2024-10-30 20:18:20 -07:00
Vadim Ogievetsky 4b7902e74a
Web console: Improve workbench view with resizable side panels (#17387) 2024-10-30 11:50:52 -07:00
Ashwin Tumma d5bb7de5cf
Fix Map Lookup Introspection Endpoints and update doc for Globally Cached Lookups (#17436)
Map Lookup Introspection API endpoints /keys and /values no longer return an invalid JSON object.
Also, update documentation to clarify the version returned by the /version introspection endpoint.

---------

Co-authored-by: Ashwin Tumma <ashwin.tumma@salesforce.com>
2024-10-30 08:23:22 -07:00
Akshat Jain 21e7e5cddd
Add benchmark suite for MSQ window functions (#17377)
* Add benchmark suite for MSQ window functions

* Fix inspection checks

* Address review comment: Rename method
2024-10-30 11:32:28 +05:30
Akshat Jain 63c91ad813
Fix backward compatibility issues in WindowOperatorQueryFrameProcessorFactory and WindowOperatorQueryFrameProcessor (#17433) 2024-10-30 11:32:02 +05:30
George Shiqi Wu 66eb365e4d
Revert "always set taskLocation (#17350)" (#17417)
This reverts commit a664fc8be3.
2024-10-29 13:31:01 -07:00
Clint Wylie 10208baab2
use big endian for compressed complex column values to fit object strategy expectations (#17422) 2024-10-29 10:21:09 -07:00
Ashwin Tumma 1be2b852e9
[Kafka Ingestion Tutorial] Update docs for Schema Config (#17409)
Co-authored-by: Ashwin Tumma <ashwin.tumma@salesforce.com>
2024-10-29 08:23:20 -07:00
Adarsh Sanjeev b7c661b801
Make tempStorageDirectory configuration optional and rely on task dir instead (#17015)
Currently, durable storage and export both require configuring a temporary directory to be used using druid.export.storage.<connectorType>.tempLocalDir and druid.msq.intermediate.storage.tempDir.

Tasks on middle manager already have a configured temporary directory. This PR aims to reduce the configuration required by using the task directory as a default if it is not explicitly configured, thus reducing the number of configs that a user has to set.

Please note that preference would be given to the user configured, druid.*.storage.temp*Dir, on the tasks. If that is not configured, we then use the configured temporary directory.

Overlord and brokers also require storage connector configurations (for the durableStorageCleanerOverlordDuty and to fetch results of async queries respectively), but do not have a default temporary task directory. The configuration is still required for these services.
2024-10-29 13:36:59 +05:30
Gian Merlino 6a9c050095
DruidOverlord: Move becomeLeader/stopBeingLeader earlier. (#17415)
* DruidOverlord: Move becomeLeader/stopBeingLeader earlier.

On becoming leader, it is helpful for the TaskRunner and TaskQueue to be
available when the SupervisorManager starts up, to aid the supervisors
in discovering their tasks.

On stopping leadership, it is helpful for the TaskRunner and TaskQueue
to be available until the SupervisorManager has finished shutting down.

They are only available when the TaskMaster is in "leader" mode, so to
achieve the above, this patch moves it earlier in the sequence.

* Adjust leadership into two phases.

* Update test.

* Adjustments for coverage.

* Stop mirrors start better.
2024-10-28 20:43:13 -07:00
Gian Merlino 446a8f466f
Update errorprone, mockito, jacoco, checkerframework. (#17414)
* Update errorprone, mockito, jacoco, checkerframework.

This patch updates various build and test dependencies, to see if they
cause unit tests on JDK 21 to behave more reliably.

* Update licenses, tests.

* Remove assertEquals.

* Repair two tests.

* Update some more tests.
2024-10-28 11:34:03 -07:00
Clint Wylie 73675d0671
clean up some thread pools in tests (#17421) 2024-10-28 09:05:15 -07:00
Gian Merlino 65acc86756
Capture more dumps on failure. (#17412)
Capture *.hprof, hs_err_pid*, replay_pid*, and core.NNNN on failure.
2024-10-26 21:25:46 -07:00
Suraj Goel 7306d280cc
Migrate jaxb bind dependency to jakarta (#17370)
- Migrated from javax.xml.bind 2.3.1  to jakarta.xml.bind 2.3.3.
- Minor version is modified to avoid any breaking changes.
2024-10-26 21:24:17 -07:00
Benjamin Hopp b59317e42b
Fix typo in security.md (#17413)
No longer using Azure Blog storage, moving to Blobs instead.
2024-10-25 13:43:58 -07:00
Akshat Jain fe0f4150c9
MSQ ingestion: Improve error message on encountering non-long timestamp column (#17411)
This PR improves the error message during MSQ ingestion if we encounter a non-long timestamp column.
2024-10-25 15:02:32 +05:30
Gian Merlino c4b513e599
SeekableStreamSupervisor: Don't await task futures in workerExec. (#17403)
Following #17394, workerExec can get deadlocked with itself, because it
waits for task futures and is also used as the connectExec for the task
client. To fix this, we need to never await task futures in the workerExec.

There are two specific changes: in "verifyAndMergeCheckpoints" and
"checkpointTaskGroup", two "coalesceAndAwait" calls that formerly occurred
in workerExec are replaced with Futures.transform (using a callback in
workerExec).

Because this adjustment removes a source of blocking, it may also improve
supervisor responsiveness for high task counts. This is not the primary
goal, however. The primary goal is to fix the bug introduced by #17394.
2024-10-24 12:07:18 -07:00
Gian Merlino 7e8671caa9
GroupByQueryConfig: Skip unnecessary toString. (#17396)
Calling toString on newConfig is unnecessary, because it will be done
automatically by the logger. This saves some effort under log levels
higher than DEBUG.
2024-10-23 19:57:22 +05:30
Akshat Jain 1e96c85b38
WindowOperatorQueryFrameProcessor: Avoid writing multiple frames to output channel in runIncrementally() (#17373)
WindowOperatorQueryFrameProcessor: Avoid writing multiple frames to output channel in runIncrementally()
2024-10-23 10:34:37 +05:30
Abhishek Radhakrishnan 43b325b6aa
Add missing `@Nullable` annotations to SqlQuery (#17398) 2024-10-22 20:34:46 -07:00
Gian Merlino 60daddedf8
SeekableStreamSupervisor: Use workerExec as the client connectExec. (#17394)
* SeekableStreamSupervisor: Use workerExec as the client connectExec.

This patch uses the already-existing per-supervisor workerExec as the
connectExec for task clients, rather than using the process-wide default
ServiceClientFactory pool.

This helps prevent callbacks from backlogging on the process-wide pool.
It's especially useful for retries, where callbacks may need to establish
new TCP connections or perform TLS handshakes.

* Fix compilation, tests.

* Fix style.
2024-10-22 20:21:21 -07:00
Clint Wylie 1157ecdec3
abstract common base of SQL micro-benchmarks to reduce boilerplate and standardize parameters (#17383)
changes:
* adds `SqlBenchmarkDatasets` which contains commonly used benchmark data generator schemas
* adds `SqlBaseBenchmark` which contains common benchmark segment generation methods for any benchmark using `SqlBenchmarkDatasets`
* adds `SqlBaseQueryBenchmark` and `SqlBasePlanBenchmark` for benchmarks measuring queries and planning respectively
* migrate all existing SQL jmh benchmarks to extend `SqlBaseQueryBenchmark`, quite dramatically reducing the boilerplate needed to create benchmarks, and allowing the use of multiple datasources within a benchmark file
* adjustments to data generator stuff to allow passing in an ObjectMapper so that the same mapper can be used for both benchmark queries and segment generation, avoiding the need to register stuff with both mappers for benchmarks
* adds `SqlProjectionsBenchmark` and `SqlComplexMetricsColumnsBenchmark` for measuring projections and measuring complex metric compression respectively
2024-10-22 19:37:17 -07:00
Kashif Faraz 9dfb378711
Remove unused coordinator dynamic configs mergeSegmentsLimit, mergeBytesLimit (#17384)
* Remove unused coordinator dynamic configs

* Update docs and web-console
2024-10-22 09:03:46 +05:30