Rule order problem

Hi,
I add some rules in coordinator UI, like:

first, add drop forever,

then, load P3M in default tier,

last, load P20D in hot_data_tier.

Then, in MySQL it should be in druid_rules table :

version | rules|

:----- | :----- |

2016-01-01T00:00:00Z | drop forever |

2016-01-01T01:00:00Z | load P3M in default tier |

2016-01-01T02:00:00Z | load P20D in hot_data_tier|

(the version timestamp is fake)

I think newer timestamp in version means newer version.

So the result may be:

recent 20 days loaded to hot_data_tier,

between recent 3 months and recent 20 days loaded to default_tier.

Am I right?

But my problem is, when adding drop forever rules, the segments in historical node (coordinator node) gone right now,

and then I add P3M and P20D, the corresponding segments missing (maybe load too slow?)!

I think I’m wrong, I should make these three rules into a rule set. Am I right?

在 2016年10月31日星期一 UTC+8下午4:32:43,Skyler Tao写道:

Hi Skyler,

I’m guessing what you’re doing is setting a single rule, saving it, and then going back and setting another single rule and saving it again which will override the old rule. You need to specify all your rules together. In the UI, you should see something like rule #1, rule #2, and rule #3, and in the database the set of 3 rules should be the payload for a single entry.

If the last rule you set was a single drop forever rule, the dataSource won’t show up in the coordinator console anymore. You can fix this by manually removing the drop forever rule from the druid_rules table in the metadata store, and then enabling the dataSource in the console (if you don’t remove the rule first, it’ll get enabled, the drop forever rule will get applied, and it’ll be disabled again).