-
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
Keep get tables API with and without database #12804
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12804 +/- ##
============================================
+ Coverage 61.75% 62.02% +0.27%
+ Complexity 207 198 -9
============================================
Files 2436 2462 +26
Lines 133233 134720 +1487
Branches 20636 20812 +176
============================================
+ Hits 82274 83560 +1286
- Misses 44911 45017 +106
- Partials 6048 6143 +95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8b58b77
to
9c1614f
Compare
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
return new ArrayList<>(rawTableNames); | ||
return getAllResources().stream().filter( | ||
resourceName -> TableNameBuilder.isTableResource(resourceName) && DatabaseUtils.isPartOfDatabase(resourceName, | ||
databaseName)).map(TableNameBuilder::extractRawTableName).distinct().collect(Collectors.toList()); |
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.
nit: could you please help me understand why we need to call distinct()
?
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.
E.g. myTable_OFFLINE
and myTable_REALTIME
should result in one raw table name myTable
9c1614f
to
dd4097b
Compare
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.
LGTM
dd4097b
to
9fa02d6
Compare
From cluster management purpose, we need APIs to read table names from all databases. Keep the original APIs the same (without filtering on database), and for database aware purpose, use the new APIs.