Add ServerRouteInfo to replace pairs maintaining the same info.#14921
Merged
Jackie-Jiang merged 9 commits intoapache:masterfrom Jan 28, 2025
Merged
Add ServerRouteInfo to replace pairs maintaining the same info.#14921Jackie-Jiang merged 9 commits intoapache:masterfrom
Jackie-Jiang merged 9 commits intoapache:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14921 +/- ##
============================================
+ Coverage 61.75% 63.72% +1.97%
- Complexity 207 1470 +1263
============================================
Files 2436 2712 +276
Lines 133233 151706 +18473
Branches 20636 23416 +2780
============================================
+ Hits 82274 96672 +14398
- Misses 44911 47777 +2866
- Partials 6048 7257 +1209
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Contributor
Jackie-Jiang
left a comment
There was a problem hiding this comment.
Thanks for cleaning it up!
| * @param segmentList List of segments assigned to the server. | ||
| * @param optionalSegmentList List of optional segments assigned to the server. | ||
| */ | ||
| @JsonCreator |
Contributor
There was a problem hiding this comment.
Do we need to ser/de this class?
Contributor
Author
There was a problem hiding this comment.
Removed. The API worked without it
Comment on lines
+30
to
+31
| private final List<String> _segmentList; | ||
| private final List<String> _optionalSegmentList; |
Contributor
There was a problem hiding this comment.
(optional) More concise
Suggested change
| private final List<String> _segmentList; | |
| private final List<String> _optionalSegmentList; | |
| private final List<String> _segments; | |
| private final List<String> _optionalSegments; |
| Pair<List<String>, List<String>> pair = | ||
| merged.computeIfAbsent(serverInstance, k -> Pair.of(new ArrayList<>(), new ArrayList<>())); | ||
| pair.getLeft().add(entry.getKey()); | ||
| ServerRouteInfo executionInfo = |
Contributor
Author
|
test failure is in an unrelated test suite. |
Jackie-Jiang
approved these changes
Jan 28, 2025
zeronerdzerogeekzerocool
pushed a commit
to zeronerdzerogeekzerocool/pinot
that referenced
this pull request
Feb 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleans up code to replace a
Pair<List<String>, List<String>with a more informative POJO class -ServerRouteInfo. The pair encapsulated two lists of segments - required and optional which is used by different parts of Pinot. When reading the code, it is not obvious whatPair.getLeftandPair.getRightis meant for without reading the function that creates this list.