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

Refine SegmentFetcherFactory #12936

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

Jackie-Jiang
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang commented Apr 16, 2024

Separated from #12886 for easier review

  • Make SegmentFetcherFactory a util class
  • Integrate the new API with URI supplier from SegmentFetcher into SegmentFetcherFactory

Note: Removed BaseTableDataManagerTest.testDownloadFromPeersWithoutStreaming() because the test setup is incorrect (peer download scheme is http but provided uri scheme is file). Didn't add a new test because it is just testing the mocking behavior, and the real flow is tested with integration test

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

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

Project coverage is 62.20%. Comparing base (59551e4) to head (4401fd5).
Report is 313 commits behind head on master.

Files Patch % Lines
.../pinot/core/data/manager/BaseTableDataManager.java 0.00% 10 Missing ⚠️
...ot/common/utils/fetcher/SegmentFetcherFactory.java 69.56% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12936      +/-   ##
============================================
+ Coverage     61.75%   62.20%   +0.45%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2503      +67     
  Lines        133233   136463    +3230     
  Branches      20636    21117     +481     
============================================
+ Hits          82274    84893    +2619     
- Misses        44911    45296     +385     
- Partials       6048     6274     +226     
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 62.15% <48.48%> (+0.45%) ⬆️
java-21 62.08% <48.48%> (+0.45%) ⬆️
skip-bytebuffers-false 62.18% <48.48%> (+0.43%) ⬆️
skip-bytebuffers-true 62.06% <48.48%> (+34.33%) ⬆️
temurin 62.20% <48.48%> (+0.45%) ⬆️
unittests 62.20% <48.48%> (+0.45%) ⬆️
unittests1 46.69% <48.48%> (-0.20%) ⬇️
unittests2 28.00% <0.00%> (+0.27%) ⬆️

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.

Collections.shuffle(peerServerURIs);
return peerServerURIs;
}, destTarFile, zkMetadata.getCrypterName());
_logger.info("Downloaded tarred segment: {} from peers to: {}, file length: {}", segmentName, destTarFile,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: LOGGER or _logger?

it it possible to get which peer the data was downloaded from and log it out here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be _logger which contains the table name info.
The actual URI picked is logged on the segment fetcher side

@Jackie-Jiang Jackie-Jiang merged commit 67cb52c into apache:master Apr 16, 2024
20 checks passed
@Jackie-Jiang Jackie-Jiang deleted the segment_fetcher_factory branch April 16, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants