Segments match the first rule that applies to it
If you have a period load rule of P1M and a period drop rule of P2M, everything from now to 1 month in the last is loaded, everything from 1M in the past to 2M in the past is dropped.
[{"period":"PT1H","tieredReplicants":{"_default_tier":1},"type":"loadByPeriod"},{"type":"dropForever"}]
According to this rule, only past 1 hour data should be taken into consideration for any druid query. The problem is I can see that through this rule 'used' field in segments table is set to 0 but I can still query the old data.
Can you tell me the possible causes for this kind of behavior?
Your quick reply would be a great help.
Thanks,
Jvalant
--
You received this message because you are subscribed to a topic in the Google Groups "Druid User" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/druid-user/ve9hb1K6RV4/unsubscribe.
To unsubscribe from this group and all its topics, 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/5a357c80-5018-4f49-adb4-d426290ba9d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to druid-user+unsubscribe@googlegroups.com.
vikasrana@dr-crd1:~$ curl -XPOST http://dr-crd2.abc.com:8081/druid/coordinator/v1/rules/cerberus_analytics -d '[{"period":"P1M","tieredReplicants":{"_default_tier":0},"type":"loadByPeriod"},{"period":"P10Y","type":"dropByPeriod"}]'
vikasrana@dr-crd1:~$ curl http://dr-crd1.abc.com:8081/druid/coordinator/v1/rules/cerberus_analytics
[]
Also checked mysql the rule table, it has _default rule:
mysql> select * from druid_rules;
+-----------------------------------+------------+--------------------------+-----------------------------------------------------------------+
| id | dataSource | version | payload |
+-----------------------------------+------------+--------------------------+-----------------------------------------------------------------+
| _default_2016-07-05T12:16:22.417Z | _default | 2016-07-05T12:16:22.417Z | [{"tieredReplicants":{"_default_tier":2},"type":"loadForever"}] |
+-----------------------------------+------------+--------------------------+-----------------------------------------------------------------+
vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$ curl -XPOST http://dr-crd2.abc.com:8081/druid/coordinator/v1/rules -d '[{"period":"P1M","tieredReplicants":{"_default_tier":0},"type":"loadByPeriod"},{"period":"P10Y","type":"dropByPeriod"}]'
vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$ curl http://dr-crd1.dr-crd2.abc.com:8081/druid/coordinator/v1/rules
{"_default":[{"tieredReplicants":{"_default_tier":2},"type":"loadForever"}]}vikasrana@dr-crd1:~$
To unsubscribe from this group and all its topics, send an email to druid-user+...@googlegroups.com.
vikasrana@dr-crd1:~$ curl http://localhost:8081/druid/coordinator/v1/rules/cerberus_analytics
[{"period":"P20D","tieredReplicants":{"_default_tier":1},"type":"loadByPeriod"},{"period":"P10Y","type":"dropByPeriod"}]vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$
vikasrana@dr-crd1:~$ curl http://localhost:8081/druid/coordinator/v1/rules/event_sdk
[{"period":"P1M","tieredReplicants":{"_default_tier":1},"type":"loadByPeriod"},{"period":"P10Y","type":"dropByPeriod"}]vikasrana@dr-crd1:~$
Also its dropping segments from historical nodes, making used=0 in MySQL. And all data is present in S3.
From Co-Ordinator logs:
2016-08-26T05:56:59,293 INFO [Coordinator-Exec--0] io.druid.server.coordinator.helper.DruidCoordinatorBalancer - [_default_tier]: Segments Moved: [1]
2016-08-26T05:56:59,293 INFO [Coordinator-Exec--0] io.druid.server.coordinator.helper.DruidCoordinatorLogger - [_default_tier] : Assigned 0 segments among 4 servers
2016-08-26T05:56:59,294 INFO [Coordinator-Exec--0] io.druid.server.coordinator.helper.DruidCoordinatorLogger - [_default_tier] : Dropped 11 segments among 4 servers
2016-08-26T05:56:59,294 INFO [Coordinator-Exec--0] io.druid.server.coordinator.helper.DruidCoordinatorLogger - [_default_tier] : Moved 1 segment(s)
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/72fcd890-81dd-4d6b-985d-116257e356fe%40googlegroups.com.