Druid Not Giving Missing segment in an interval by Zero Filling

Hi,
I have encountered a case when I am not getting zero filled segments in the timeseries output query (Which Ofcourse lies inside my interval of query).

Just for more info on this :

My interval is like

“intervals”: [
“2017-02-24T00:00:00.000/2017-02-25T00:00:00.000”
],

Time Buckets are hourly granuality based.

And in Druid when i checked , there was no segment file for 6-7 PM and 7-8 PM.

But In the output I should get the result for above hours also , with zero filled , right ? My skipEmptyBuckets is set to false.

This looks to be a Druid Bug to me at first go.

Can Some one please help?

Thanks,

Pravesh Gupta

what granularity are you using while doing the query ? To get hourly buckets you need to use “hour” granularity in the query.

Yes My Granuality in query is also hour .

Can anyone help here ?

Thanks,

Pravesh Gupta

Hi Pravesh,
It would be helpful for us if you can share druid version, complete query and the sample results you are getting.

Following are the required details :

Druid Version : 0.9.1.1

Hi,
I have following Druid TimeSeries Query (Granularity Hour in a Day):

{

“queryType”: “timeseries”,

“dataSource”: “ds1”,

“granularity”: {

“type”: “period”,

“period”: “PT1H”,

“origin”: “2017-02-24T00:00:00.000”

},

“descending”: “false”,

“intervals”: [

“2017-02-24T00:00:00.000/2017-02-25T00:00:00.000”

],

“aggregations”: [

{

“type”: “longSum”,

“name”: “aggr1Name”,

“fieldName”: “eventCount”

}

],

“context”: {

“queryId”: “1487933258401_103_0.7445333478096735”

}

}

As per Above Druid Query, I am expecting to receive all the Segments (24 in total corresponding to 24 hours in a day ) in the Druid Output, but However I am getting only 21 segments ,no pattern in the output as well.

Following is the Druid Output:

[

{

“timestamp”: “2017-02-24T00:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T01:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T02:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T03:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T04:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T05:00:00.000Z”,

“result”: {

“columnKey”: 19

}

},

{

“timestamp”: “2017-02-24T06:00:00.000Z”,

“result”: {

“columnKey”: 16

}

},

{

“timestamp”: “2017-02-24T07:00:00.000Z”,

“result”: {

“columnKey”: 15

}

},

{

“timestamp”: “2017-02-24T08:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T09:00:00.000Z”,

“result”: {

“columnKey”: 8

}

},

{

“timestamp”: “2017-02-24T10:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T11:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T12:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T13:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T14:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T15:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T16:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T17:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T18:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T21:00:00.000Z”,

“result”: {

“columnKey”: 0

}

},

{

“timestamp”: “2017-02-24T22:00:00.000Z”,

“result”: {

“columnKey”: 0

}

}

]

Any Help Please ??

Thanks,

Pravesh Gupta

Hi Pravesh,
your query looks fine. Can you also try with “granularity” : “hour” instead of period granularity. I wonder if that is causing it ?

No that doesnt seem to work as well.
I am able to reproduce this issue for minute as well, though my segment are hourly sized. Some minutes in an hour are also not comming up from Druid.

Following is the Druid Query :

{

“queryType”: “timeseries”,

“dataSource”: “campaign_reporting_event_shared_ds_1”,

“granularity”:“minute”,

“descending”: “false”,

“intervals”: [

“2017-03-05T00:00:00.000/2017-03-06T00:00:00.000”

],

“aggregations”: [

{

“type”: “longSum”,

“name”: “total_delivered_BF60E684-D0F3-FC9D-8668-53AB27028DD5”,

“fieldName”: “eventCount”

}

],

“context”: {

“queryId”: “1490085055687_2196_0.6030748523107982”

}

}

I am supposed to get 24 * 60 = Elements in the druid output , but I am getting only 256. Attaching the Druid Output in a file.

Is this some known issue on the Druid ??

Please help. Thanks in advance.

output.txt (35 KB)