Skip to content
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

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

Jackie-Jiang
Copy link
Contributor

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.

@codecov-commenter
Copy link

codecov-commenter commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 52.70270% with 35 lines in your changes are missing coverage. Please review.

Project coverage is 62.02%. Comparing base (59551e4) to head (9fa02d6).
Report is 221 commits behind head on master.

Files Patch % Lines
...apache/pinot/controller/BaseControllerStarter.java 60.97% 11 Missing and 5 partials ⚠️
...ntroller/helix/core/PinotHelixResourceManager.java 57.89% 4 Missing and 4 partials ⚠️
...controller/helix/core/minion/PinotTaskManager.java 0.00% 5 Missing ⚠️
...ller/api/resources/PinotBrokerRestletResource.java 50.00% 2 Missing ⚠️
.../helix/core/cleanup/StaleInstancesCleanupTask.java 33.33% 2 Missing ⚠️
.../resources/PinotLeadControllerRestletResource.java 0.00% 1 Missing ⚠️
...elix/core/periodictask/ControllerPeriodicTask.java 0.00% 0 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 61.96% <52.70%> (+0.25%) ⬆️
java-21 61.90% <52.70%> (+0.28%) ⬆️
skip-bytebuffers-false 61.98% <52.70%> (+0.23%) ⬆️
skip-bytebuffers-true 61.87% <52.70%> (+34.14%) ⬆️
temurin 62.02% <52.70%> (+0.27%) ⬆️
unittests 62.02% <52.70%> (+0.27%) ⬆️
unittests1 46.70% <ø> (-0.19%) ⬇️
unittests2 27.98% <52.70%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return new ArrayList<>(rawTableNames);
return getAllResources().stream().filter(
resourceName -> TableNameBuilder.isTableResource(resourceName) && DatabaseUtils.isPartOfDatabase(resourceName,
databaseName)).map(TableNameBuilder::extractRawTableName).distinct().collect(Collectors.toList());
Copy link
Contributor

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()?

Copy link
Contributor Author

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

Copy link
Contributor

@zhtaoxiang zhtaoxiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jackie-Jiang Jackie-Jiang merged commit 00b5a73 into apache:master Apr 8, 2024
19 checks passed
@Jackie-Jiang Jackie-Jiang deleted the fix_get_tables branch April 8, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants