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

[pulsar] Added getTopics() implementation for Pulsar #14857

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

suvodeep-pyne
Copy link
Contributor

@suvodeep-pyne suvodeep-pyne commented Jan 21, 2025

Adds serviceHttpUrl config and topic listing capability to Pulsar stream ingestion

Key Changes

  • Added new serviceHttpUrl configuration parameter for PulsarConfig that is only used by pulsar admin client. This config is only used when creating the admin client. This maintains backward compatibility.
  • Implemented getTopics() method in PulsarStreamMetadataProvider to list all topics across tenants and namespaces
  • Created PulsarAdmin client functionality to enable topic listing operations

Refactoring

  • Extracted authentication configuration logic into separate methods
  • Improved error handling in client creation and cleanup
  • Enhanced code organization in PulsarPartitionLevelConnectionHandler

Testing

  • Added new test case testGetTopics() to verify topic listing functionality
  • Updated existing tests to include serviceHttpUrl configuration
  • Verified topic listing across multiple tenants and namespaces

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 81.25000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 63.75%. Comparing base (59551e4) to head (06c77ca).
Report is 1602 commits behind head on master.

Files with missing lines Patch % Lines
.../pulsar/PulsarPartitionLevelConnectionHandler.java 75.86% 4 Missing and 3 partials ⚠️
...in/stream/pulsar/PulsarStreamMetadataProvider.java 88.23% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #14857      +/-   ##
============================================
+ Coverage     61.75%   63.75%   +2.00%     
- Complexity      207     1620    +1413     
============================================
  Files          2436     2708     +272     
  Lines        133233   151346   +18113     
  Branches      20636    23360    +2724     
============================================
+ Hits          82274    96487   +14213     
- Misses        44911    47615    +2704     
- Partials       6048     7244    +1196     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.69% <81.25%> (+1.98%) ⬆️
java-21 63.64% <81.25%> (+2.01%) ⬆️
skip-bytebuffers-false 63.74% <81.25%> (+1.99%) ⬆️
skip-bytebuffers-true 63.59% <81.25%> (+35.86%) ⬆️
temurin 63.75% <81.25%> (+2.00%) ⬆️
unittests 63.74% <81.25%> (+2.00%) ⬆️
unittests1 56.30% <ø> (+9.41%) ⬆️
unittests2 34.06% <81.25%> (+6.32%) ⬆️

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.

@xiangfu0 xiangfu0 merged commit 7cea247 into apache:master Jan 22, 2025
21 checks passed
@suvodeep-pyne suvodeep-pyne deleted the spyne/getTopicsPulsar branch January 23, 2025 22:47
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