segment location issue

40 views
Skip to first unread message

Egor Ryashin

unread,
Oct 4, 2018, 2:15:15 PM10/4/18
to Druid User
Hi,

I'm trying to locate which nodes serve segments of the time interval. To get servers list I use this request to Coordinator:
curl  http://<host:port>/druid/coordinator/v1/datasources/<datasource>/intervals/2018-09-28T00:00:00.000_2018-09-28T01:00:00.000?full | jq -r 'to_entries[]|.value | to_entries[]|.value.servers[]' | sort | uniq 

Next, I try sending "timeBoundary" query to one of the servers, like:
curl -X POST http://<host:port>/druid/v2 -d'{
   "queryType" : "timeBoundary",
    "dataSource": "<datasource>"
}' -H "Content-type: application/json"

But I receive an empty result like: 
[]

It looks like there is no data at all, what did I miss here?

Version: 0.11.0

Thanks,
Egor

Egor Ryashin

unread,
Oct 4, 2018, 2:38:19 PM10/4/18
to Druid User
BTW, I works in my local environment with 1 historical node and 1 datasource, but doesn't work in production.

Charles Allen

unread,
Oct 4, 2018, 4:25:40 PM10/4/18
to druid...@googlegroups.com
Egor is this second query directly to historicals?

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/41928c3e-3526-4635-be96-e1b50db2bf4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Egor Ryashin

unread,
Oct 4, 2018, 4:30:02 PM10/4/18
to Druid User
Yes.

Charles Allen

unread,
Oct 4, 2018, 4:32:39 PM10/4/18
to druid...@googlegroups.com
I've seen weird cases where querying the historicals directly doesn't yield any query results!

This might be a historical-query-directly problem and not a timeBoundary problem. Do any queries work when hitting historicals directly?

Egor Ryashin

unread,
Oct 4, 2018, 4:46:51 PM10/4/18
to Druid User
No queries return results (tried `timeseries` also).

Egor Ryashin

unread,
Oct 5, 2018, 9:25:12 AM10/5/18
to Druid User
I wonder if someone has an idea how to reproduce it in local environment and find a root cause?


On Thursday, October 4, 2018 at 9:15:15 PM UTC+3, Egor Ryashin wrote:

Atul Mohan

unread,
Oct 5, 2018, 11:42:44 AM10/5/18
to druid...@googlegroups.com
Hi Egor,
I've faced this issue previously as well. However I've noticed that the historical does give back results but only when all the chunks for the specified time interval are part of that historical. Have you tried spawning multiple historical processes on a local host and check if the issue is reproducible?

Thanks,
Atul

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Atul Mohan

Egor Ryashin

unread,
Oct 5, 2018, 1:32:07 PM10/5/18
to Druid User
Nope, unfortunately, tests don't confirm it.
Meanwhile, investigation in prod shows that specifying a correct partition number also returns empty result, ie:
curl -X POST http://$1/druid/v2 -d'{
  "queryType": "timeseries",
  "dataSource": "'$2'",
  "granularity": "hour",
  "intervals": {
    "type": "segments",
    "segments": [
    {
      "itvl":"2018-09-28T00:00:00.000Z/2018-09-28T01:00:00.000Z",
      "ver":"'$3'",
      "part": '$4'  
    }
    ]
  },
  "aggregations": [
    { "type" : "count", "name" : "count" }
  ],
  "metric": "count"
}' -H "Content-type: application/json"

Still, it works for some other datasources, I checked that ShardSpec type is the same (hashed).

Egor Ryashin

unread,
Oct 8, 2018, 8:08:10 AM10/8/18
to Druid User
BTW, the restart of the node doesn't solve the issue.
Reply all
Reply to author
Forward
0 new messages