New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a pluggable interface for Table config tuner #6255
Conversation
thanks for creating the issue. I added a comment there |
Codecov Report
@@ Coverage Diff @@
## master #6255 +/- ##
==========================================
- Coverage 66.44% 65.39% -1.06%
==========================================
Files 1075 1291 +216
Lines 54773 62143 +7370
Branches 8168 9013 +845
==========================================
+ Hits 36396 40640 +4244
- Misses 15700 18613 +2913
- Partials 2677 2890 +213
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
How does this play with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a full fledged rule engine to automatically recommend table configs (indexing and other things to begin with). We should enhance that instead of implementing a new one. Starting point for the rule engine driver
https://github.com/apache/incubator-pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/recommender/RecommenderDriver.java
@mcvsubbu , The correct code to begin with for the newly implemented rule engine is RecommenderDriver. |
pinot-common/src/main/java/org/apache/pinot/common/config/tuner/TableConfigTunerRegistry.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/config/tuner/RealTimeAutoIndexTuner.java
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/config/tuner/RealTimeAutoIndexTuner.java
Outdated
Show resolved
Hide resolved
@icefury71 , can we see how the RecommendationEngine (the rule engine that was recently implemented by @jasperjiaguo ) be plugged into this interface or at least we can identify if the abstractions are correct. IIUC, this PR provides a pluggable interface that can use a rule engine and the reommendations generated by the engine to modify the table config? The existing rule engine takes a couple of inputs (at bare minimum the following)
It generates a series of recommendations on how to tune the table config. It will be great to see if there is an impedance mismatch between the abstractions sooner and converge. cc @jasperjiaguo @mcvsubbu |
As pointed out by @siddharthteotia we already have a rule engine in place. Can we follow the interface/factory pattern here, so that we can ingest whatever factory we want? That way, if a rule engine needs more information (sample segments, sample queries, etc) to make the decision, it can. Also, we should be able to chain these (and each member of the chain should modify only those that are not already touched). |
@siddharthteotia @mcvsubbu since we're using an annotation type, there is no such fixed interface. The parameter and return type validations are all done via code which can be evolved over time. I'm happy to do that in this PR - but wanted to be clear. @mcvsubbu the annotation type was a recommendation from @kishoreg instead of the old interface / factory pattern. This approach definitely makes it easy to register tuners and is much more flexible. Let me know if this is an issue. |
I am sure I am missing something. How would I register a tuner that takes a URI for a sample segment, and an object with a query pattern in it (say, has queries, and percentages) |
pinot-common/src/main/java/org/apache/pinot/common/config/tuner/NoOpTableTableConfigTuner.java
Show resolved
Hide resolved
@icefury71 , Approved this. We can make the existing Tuner (RecommenderDriver) extend the Tuner interface, implement init(), apply() and register. I highly suggest to explore this tuner and see if this can be further improved/optimized. It is essentially a rule engine where you can add your own custom rules that will fire to generate a series of recommendations. |
- Adding a Tuner annotation type for auto-discovering such tuners
1312ea3
to
cd8dc06
Compare
Description
Related to step 1 of #6254
This diff adds an annotation type to register table config tuner methods with the Pinot controller. When a new table is being added, this tuner can be used to customize the table config.
Upgrade Notes
Does this PR prevent a zero down-time upgrade?
No
Does this PR fix a zero-downtime upgrade introduced earlier?
No
Does this PR otherwise need attention when creating release notes?
Yes (will add release notes in final commit)