-
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
[Issue 5902] Support to get managed ledger info of a partitioned topic #6532
Conversation
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just left a minor comment.
|
||
import java.util.Map; | ||
|
||
public class PartitionedManagedLedgerInfo extends ManagedLedgerInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to move it to the broker module since the mledger
does not have any concepts about partition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@codelipenghui Please help to review again, thanks. |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
Doc has been added: https://pulsar.apache.org/docs/en/next/pulsar-admin/#info-internal |
apache#6532) ### Motivation Fixes apache#5902 If there is a partitioned topic with too many partitions, users need to get the `internal-info` one by one. If called `internal-info` on a partitioned topic, it fails as below: ``` $ bin/pulsar-admin topics info-internal persistent://public/default/test2 HTTP 400 Bad Request Reason: HTTP 400 Bad Request ``` ### Modifications Support to get all partitions `internal-info` of a partitioned topic, seems like below: ``` $ bin/pulsar-admin topics info-internal persistent://public/default/test2 { "version": 0, "partitions": { "persistent://public/default/test2-partition-1": { "version": 1, "creationDate": "2020-03-12T21:24:52.777+08:00", "modificationDate": "2020-03-12T21:25:50.85+08:00", "ledgers": [ { "ledgerId": 16 } ], "cursors": { "test2-sub": { "version": 0, "creationDate": "2020-03-12T21:25:51.178+08:00", "modificationDate": "2020-03-12T21:25:51.178+08:00", "cursorsLedgerId": 18, "markDelete": { "ledgerId": 16, "entryId": -1 } } } }, "persistent://public/default/test2-partition-0": { "version": 1, "creationDate": "2020-03-12T21:24:52.777+08:00", "modificationDate": "2020-03-12T21:25:50.952+08:00", "ledgers": [ { "ledgerId": 17 } ], "cursors": { "test2-sub": { "version": 0, "creationDate": "2020-03-12T21:25:51.177+08:00", "modificationDate": "2020-03-12T21:25:51.177+08:00", "cursorsLedgerId": 19, "markDelete": { "ledgerId": 17, "entryId": -1 } } } } } } ```
Motivation
Fixes #5902
If there is a partitioned topic with too many partitions, users need to get the
internal-info
one by one. If calledinternal-info
on a partitioned topic, it fails as below:Modifications
Support to get all partitions
internal-info
of a partitioned topic, seems like below: