SegmentMissingException occured when using segment metadata api

230 views
Skip to first unread message

yh lee

unread,
May 4, 2021, 1:51:15 AM5/4/21
to Druid User
Hi all
I have question about segment metadata api

When I called segment metadata api like below,

---
curl -vvv -XPOST -H 'Content-Type: application/json' ${DRUID_ROUTER_ENDPOINT}/druid/v2/ -d\@request

{"queryType":"segmentMetadata","dataSource":"some_datasource","merge":true,"analysisTypes":[],"intervals":["1950-01-01T00:00:00.000+09:00/2999-01-01T00:00:00.000+09:00"]}

---

Sometimes it returns error likes below

---
* Trying 10.195.32.156:8080... * Connected to ${DRUID_ENDPOINT} (#0) > POST /druid/v2/ HTTP/1.1 > Host: ${DRUID_ENDPOINT} > User-Agent: curl/7.71.1 > Accept: */* > Content-Type: application/json > Content-Length: 158 > * upload completely sent off: 158 out of 158 bytes * Mark bundle as not supporting multiuse < HTTP/1.1 500 Server Error < Date: Tue, 04 May 2021 03:02:44 GMT < Date: Tue, 04 May 2021 03:02:44 GMT < Content-Type: application/json < Content-Length: 424 < * Connection #0 to host ${DRUID_ENDPOINT} left intact {"error":"Unknown exception","errorMessage":"No results found for segments[[SegmentDescriptor{interval=2021-01-13T15:00:00.000Z/2021-01-14T15:00:00.000Z, version='2021-01-14T19:52:04.806Z', partitionNumber=118}, SegmentDescriptor{interval=2021-02-23T15:00:00.000Z/2021-02-24T15:00:00.000Z, version='2021-02-24T20:34:15.117Z', partitionNumber=1}]]","errorClass":"org.apache.druid.segment.SegmentMissingException","host":null}%
---

The segment included in the message is a segment that actually exists, and it was a segment that was previously located on the same historical server without being balanced.
This error doesn't happen every time, it happens about once every 10 times.

Here is server logs
---
2021-05-04T12:02:45,280 INFO [qtp1004759548-224[segmentMetadata_[some_datasource]_8ba1a90d-dc46-4ed3-9ab6-88f8ef561441]] org.apache.druid.query.RetryQueryRunner - [2] missing segments found. Retry attempt [1] 2021-05-04T12:02:45,283 WARN [qtp1004759548-224[segmentMetadata_[some_datasource]_8ba1a90d-dc46-4ed3-9ab6-88f8ef561441]] org.apache.druid.server.QueryLifecycle - Exception while processing queryId [8ba1a90d-dc46-4ed3-9ab6-88f8ef561441] (org.apache.druid.segment.SegmentMissingException: No results found for segments[[SegmentDescriptor{interval=2021-01-13T15:00:00.000Z/2021-01-14T15:00:00.000Z, version='2021-01-14T19:52:04.806Z', partitionNumber=118}, SegmentDescriptor{interval=2021-02-23T15:00:00.000Z/2021-02-24T15:00:00.000Z, version='2021-02-24T20:34:15.117Z', partitionNumber=1}]]) 2021-05-04T12:02:45,284 ERROR [qtp1004759548-224[segmentMetadata_[some_datasource]_8ba1a90d-dc46-4ed3-9ab6-88f8ef561441]] org.apache.druid.server.QueryResource - Exception handling request: {class=org.apache.druid.server.QueryResource, exceptionType=class org.apache.druid.segment.SegmentMissingException, exceptionMessage=No results found for segments[[SegmentDescriptor{interval=2021-01-13T15:00:00.000Z/2021-01-14T15:00:00.000Z, version='2021-01-14T19:52:04.806Z', partitionNumber=118}, SegmentDescriptor{interval=2021-02-23T15:00:00.000Z/2021-02-24T15:00:00.000Z, version='2021-02-24T20:34:15.117Z', partitionNumber=1}]], query={"queryType":"segmentMetadata","dataSource":{"type":"table","name":"some_datasource"},"intervals":{"type":"LegacySegmentSpec","intervals":["1949-12-31T15:00:00.000Z/2998-12-31T15:00:00.000Z"]},"toInclude":{"type":"all"},"merge":true,"context":{"queryId":"8ba1a90d-dc46-4ed3-9ab6-88f8ef561441"},"analysisTypes":[],"usingDefaultInterval":false,"lenientAggregatorMerge":false,"descending":false,"granularity":{"type":"all"}}, peer=10.195.32.156} (org.apache.druid.segment.SegmentMissingException: No results found for segments[[SegmentDescriptor{interval=2021-01-13T15:00:00.000Z/2021-01-14T15:00:00.000Z, version='2021-01-14T19:52:04.806Z', partitionNumber=118}, SegmentDescriptor{interval=2021-02-23T15:00:00.000Z/2021-02-24T15:00:00.000Z, version='2021-02-24T20:34:15.117Z', partitionNumber=1}]])
---

Why am I getting this error? There is no related data, so I am asking a question.

Thanks
Reply all
Reply to author
Forward
0 new messages