[improve][client]: add --streaming option to topics partitioned-stats-internal
Motivation
Streaming the stats output directly to the standard output without parsing the response in memory.
Modifications
added --streaming flag for topics stats-internal/partitioned-stats-internal commands to stream the stats.
Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added unit tests.
Does this pull request potentially affect one of the following parts:
added --streaming flag for topics stats-internal/partitioned-stats-internal commands
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [x] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
Documentation
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete
Matching PR in forked repository
PR in forked repository: https://github.com/dlg99/pulsar/pull/21
Codecov Report
Attention: Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.
Project coverage is 74.52%. Comparing base (
bbc6224) to head (cd88109). Report is 667 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #23380 +/- ##
============================================
+ Coverage 73.57% 74.52% +0.94%
- Complexity 32624 34468 +1844
============================================
Files 1877 1934 +57
Lines 139502 145158 +5656
Branches 15299 15874 +575
============================================
+ Hits 102638 108176 +5538
+ Misses 28908 28679 -229
- Partials 7956 8303 +347
| Flag | Coverage Δ | |
|---|---|---|
| inttests | 27.71% <0.00%> (+3.13%) |
:arrow_up: |
| systests | 24.53% <0.00%> (+0.20%) |
:arrow_up: |
| unittests | 73.87% <52.17%> (+1.03%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...in/java/org/apache/pulsar/client/admin/Topics.java | 78.57% <ø> (+1.07%) |
:arrow_up: |
| ...in/java/org/apache/pulsar/admin/cli/CmdTopics.java | 80.01% <85.71%> (-1.16%) |
:arrow_down: |
| ...pache/pulsar/client/admin/internal/TopicsImpl.java | 82.97% <0.00%> (+0.96%) |
:arrow_up: |
slightly related #18263
@dlg99 please address the review feedback, https://github.com/apache/pulsar/pull/23380#pullrequestreview-2339343482.