pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][client]: add --streaming option to topics partitioned-stats-internal

Open dlg99 opened this issue 1 year ago • 3 comments

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

dlg99 avatar Sep 30 '24 16:09 dlg99

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.

Files with missing lines Patch % Lines
...pache/pulsar/client/admin/internal/TopicsImpl.java 0.00% 9 Missing :warning:
...in/java/org/apache/pulsar/admin/cli/CmdTopics.java 85.71% 1 Missing and 1 partial :warning:
Additional details and impacted files

Impacted file tree graph

@@             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:

... and 600 files with indirect coverage changes

codecov-commenter avatar Sep 30 '24 20:09 codecov-commenter

slightly related #18263

lhotari avatar Oct 14 '24 12:10 lhotari

@dlg99 please address the review feedback, https://github.com/apache/pulsar/pull/23380#pullrequestreview-2339343482.

lhotari avatar Oct 15 '24 16:10 lhotari