-
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
[pulsar-admin] allow to get ledger metadata along with topic stats-internal #8180
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
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
jiazhai
approved these changes
Oct 2, 2020
/pulsarbot run-failure-checks |
lbenc135
pushed a commit
to lbenc135/pulsar
that referenced
this pull request
Oct 3, 2020
…ternal (apache#8180) ### Motivation Pulsar-admin api and CLI utility is a tool used for operational and system debugging purpose. `pulsar-admin topics stats-internal` command gives internals of the topic and it also shows list of ledgers where data has been written. However, sometimes operation team wants to know more details about ledgers such as : number of ensembles and list of bookies which own the ledger to find out issue with faulty bookie. right now, we have to use zookeeper-shell utility and read znode value to fetch such information. So, it would be useful if ledger-info also has ledger-metadata and we can get it from pulsar-admin CLI. ### Modification - Added ledger metadata into ledger-info response of the `topics stats-internal` command. - user can pass additional flag to add ledger metadata else user will not see any change in output of `topics stats-internal` ### Result ``` ./bin/pulsar-admin persistent stats-internal <topic> -m : { "ledgerId" : 23, "entries" : 200, "size" : 11100, "offloaded" : false, "metadata" : "LedgerMetadata{formatVersion=3, ensembleSize=2, writeQuorumSize=2, ackQuorumSize=2, state=CLOSED, length=11100, lastEntryId=199, digestType=CRC32C, password=OMITTED, ensembles={0=[1.1.1.1:3182, 2.2.2.2:3181], 100=[1.1.1.1:3182, 3.3.3.3:3181]}, customMetadata={component=base64:bWFuYWdlZC1sZWRnZXI=, pulsar/managed-ledger=base64:c2FtcGxlL3N0YW5kYWxvbmUvbnMxL3BlcnNpc3RlbnQvdDE=}}" } ```
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Nov 13, 2020
…ternal (apache#8180) ### Motivation Pulsar-admin api and CLI utility is a tool used for operational and system debugging purpose. `pulsar-admin topics stats-internal` command gives internals of the topic and it also shows list of ledgers where data has been written. However, sometimes operation team wants to know more details about ledgers such as : number of ensembles and list of bookies which own the ledger to find out issue with faulty bookie. right now, we have to use zookeeper-shell utility and read znode value to fetch such information. So, it would be useful if ledger-info also has ledger-metadata and we can get it from pulsar-admin CLI. ### Modification - Added ledger metadata into ledger-info response of the `topics stats-internal` command. - user can pass additional flag to add ledger metadata else user will not see any change in output of `topics stats-internal` ### Result ``` ./bin/pulsar-admin persistent stats-internal <topic> -m : { "ledgerId" : 23, "entries" : 200, "size" : 11100, "offloaded" : false, "metadata" : "LedgerMetadata{formatVersion=3, ensembleSize=2, writeQuorumSize=2, ackQuorumSize=2, state=CLOSED, length=11100, lastEntryId=199, digestType=CRC32C, password=OMITTED, ensembles={0=[1.1.1.1:3182, 2.2.2.2:3181], 100=[1.1.1.1:3182, 3.3.3.3:3181]}, customMetadata={component=base64:bWFuYWdlZC1sZWRnZXI=, pulsar/managed-ledger=base64:c2FtcGxlL3N0YW5kYWxvbmUvbnMxL3BlcnNpc3RlbnQvdDE=}}" } ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Pulsar-admin api and CLI utility is a tool used for operational and system debugging purpose.
pulsar-admin topics stats-internal
command gives internals of the topic and it also shows list of ledgers where data has been written. However, sometimes operation team wants to know more details about ledgers such as : number of ensembles and list of bookies which own the ledger to find out issue with faulty bookie. right now, we have to use zookeeper-shell utility and read znode value to fetch such information.So, it would be useful if ledger-info also has ledger-metadata and we can get it from pulsar-admin CLI.
Modification
topics stats-internal
command.topics stats-internal
Result