kroeders commented on pull request #10129:
URL: https://github.com/apache/druid/pull/10129#issuecomment-657793975
hi @nishantmonu51 thanks for taking a look!
I think we're pretty much on the same page and some of these concerns are
addressable at the UI layer. The current implementation for rules is basically
already rule groups / rulesets, even the default rules are using a faux data
source called __default and an array for the payload. It would be easy to add
an "edit rules" option and restrict importable rules to exclude actual data
sources.
Is using RuleGroups effectively just introducing a one-to-many relationship
between data sources and rules? From a modeling perspective, I definitely agree
that is a good idea. This gives reusability, but it doesn't allow sharing as
well as fine tuning. The original use case that I ran into was having multiple
defaults in a cluster, where the goal was to allow that kind of fine tuning on
top of different sets of shared rules. This is where an includes/import rule
came from - instead of just importing one ruleset at the end of the rules for a
data source, generalize that and allow other rulesets to be imported anywhere
in the execution of rules for a dataset. The nice thing about adding a new rule
is that there is no change required to the schema in the database to support
this.
I thought about having some convention, similar to the default rules, that
said any ruleset starting with "__" is a special ruleset that can be included
in other rules and having a way to launch the editor to manage those. I was
thinking allowing or excluding importing rules from an existing datasource,
rather than a special ruleset, would just be a UI level decision. It would be
straightforward to add a notice in the UI to avoid confusion (e.g. Caution
these rules are imported in datasource X,Y,Z etc)
I was thinking, maybe I should start an issue talking about the general idea
of increased reusability in retention rules and then reference this as one of
the possible solutions?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]