Hi Druids I'm ingesting data via kafka supervisor...
# general
j
Hi Druids I'm ingesting data via kafka supervisor spec with segment granularity as
DAY
and there are 61 segments created by Druid in a Day with around 1000 rows are there in the data source, Since I'm trying to query the data via
Scan
Druid native query but getting this below error, Please help me to get things working.
Copy code
"{"error":"Resource limit exceeded","errorClass":"org.apache.druid.query.ResourceLimitExceededException","host":"localhost:8083","errorCode":"legacyQueryException","persona":"OPERATOR","category":"INVALID_INPUT","errorMessage":"Time ordering is not supported for a Scan query with 61 segments per time chunk and a row limit of 9,223,372,036,854,775,807. Try reducing your query limit below maxRowsQueuedForOrdering (currently 100,000), or using compaction to reduce the number of segments per time chunk, or raising maxSegmentPartitionsOrderedInMemory (currently 50) above the number of segments you have per time chunk.","context":{"host":"localhost:8083","errorClass":"org.apache.druid.query.ResourceLimitExceededException","legacyErrorCode":"Resource limit exceeded"}}"
j
There is a limit in the number of segments opened per time interval for some query types. Have you tried compacting your data to reduce the segment count (i.e. fragmentation)? With only 1000 rows I would assume the data can all fit into one segment.
j
Yes, I tried compacting but it does on next day and not for current day
j
Are you on a newer release of Druid which has concurrent append/replace? If so, then you can turn that on and do compaction for current day as well. Based on the relatively low volume of records coming in it seems to me that this would work well for you ... https://druid.apache.org/docs/latest/ingestion/concurrent-append-replace
g
judging by the error, it seems that you are wanting to do an
order by __time
with no
limit
? if you know that there will be only around 1000 rows, you can add
limit 10000
(anything less than
100000
is fine) and you won't run into this error
👍 1
j
I had to add "maxSegmentPartitionsOrderedInMemory": 100 in the scan query to make it work
g
that would work too!