-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refactor PinotTaskManager class #12964
Refactor PinotTaskManager class #12964
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12964 +/- ##
============================================
+ Coverage 61.75% 62.20% +0.45%
+ Complexity 207 198 -9
============================================
Files 2436 2502 +66
Lines 133233 136503 +3270
Branches 20636 21128 +492
============================================
+ Hits 82274 84913 +2639
- Misses 44911 45318 +407
- Partials 6048 6272 +224
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Suggest keeping the following APIs:
Map<String, List<String>> scheduleTasksForAllTables(@Nullable String minionInstanceTag)
Map<String, List<String>> scheduleTasksForDatabase(@Nullable String database, @Nullable String minionInstanceTag)
Map<String, List<String>> scheduleTasksForTable(String tableNameWithType, @Nullable String minionInstanceTag)
List<String> scheduleTaskForAllTables(String taskType, @Nullable String minionInstanceTag)
List<String> scheduleTaskForDatabase(String taskType, @Nullable String database, @Nullable String minionInstanceTag)
List<String> scheduleTaskForTable(String taskType, String tableNameWithType, @Nullable String minionInstanceTag)
70b3da8
to
8313729
Compare
label:
refactor
The PinotTaskManager had a lot of
scheduleTask
methods which was making it unreadable and hard to make changes as adding a new param needs to properly vetted throughout the code.This change leaves 6 public methods in the class:
The first 3 methods schedules all the tasks for given table / database / cluster. The next 3 methods, schedules the task type specified for database / tables / cluster.
This makes the code more readable and easy to use.