-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][cli] Fix NPE in admin-CLI topic stats command #18326
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vineeth1995
changed the title
[improve][admin] Fix NPE in admin-CLI topic stats command
[improve][pulsar-client-tools] Fix NPE in admin-CLI topic stats command
Nov 3, 2022
vineeth1995
changed the title
[improve][pulsar-client-tools] Fix NPE in admin-CLI topic stats command
[improve][cli] Fix NPE in admin-CLI topic stats command
Nov 3, 2022
Codecov Report
@@ Coverage Diff @@
## master #18326 +/- ##
============================================
+ Coverage 40.04% 46.11% +6.06%
- Complexity 8625 8934 +309
============================================
Files 687 608 -79
Lines 67436 58071 -9365
Branches 7221 6054 -1167
============================================
- Hits 27007 26781 -226
+ Misses 37411 28275 -9136
+ Partials 3018 3015 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
rdhabalia
approved these changes
Nov 3, 2022
Technoboy-
pushed a commit
that referenced
this pull request
Nov 4, 2022
Co-authored-by: Vineeth <vineeth.polamreddy@verizonmedia.com>
congbobo184
pushed a commit
that referenced
this pull request
Nov 7, 2022
Co-authored-by: Vineeth <vineeth.polamreddy@verizonmedia.com> (cherry picked from commit 251d9fd)
congbobo184
pushed a commit
that referenced
this pull request
Nov 30, 2022
Co-authored-by: Vineeth <vineeth.polamreddy@verizonmedia.com> (cherry picked from commit 251d9fd)
liangyepianzhou
pushed a commit
that referenced
this pull request
Dec 9, 2022
Co-authored-by: Vineeth <vineeth.polamreddy@verizonmedia.com> (cherry picked from commit 251d9fd)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/cli
cherry-picked/branch-2.9
Archived: 2.9 is end of life
cherry-picked/branch-2.10
cherry-picked/branch-2.11
doc-not-needed
Your PR changes do not impact docs
ready-to-test
release/2.9.4
release/2.10.3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The admin stats command throws NullPointerException when fetching stats for a topic. This PR aims to fix the issue
Stacktrace:
sudo cloud-messaging-admin persistent stats persistent://sessionsearch-k8s/global/search_history/get
java.lang.NullPointerException
at org.apache.pulsar.admin.cli.CmdPersistentTopics$GetStats.run(CmdPersistentTopics.java:349)
at org.apache.pulsar.admin.cli.CmdBase.run(CmdBase.java:87)
at org.apache.pulsar.admin.cli.PulsarAdminTool.run(PulsarAdminTool.java:290)
at org.apache.pulsar.admin.cli.PulsarAdminTool.main(PulsarAdminTool.java:339)
Modifications
Get persistentTopics exclusively if the value is Null.
Verifying this change
This change is already covered by existing tests, such as PulsarAdminToolTest.persistentTopics().
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete