You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "ub-3 (via GitHub)" <gi...@apache.org> on 2024/07/15 08:05:18 UTC

[D] Ledger and topics [pulsar]

GitHub user ub-3 created a discussion: Ledger and topics

1. Can one ledger of bookkeeper relate to multiple topics? 
2. And how to find the topics to which it belongs by ledger id.

GitHub link: https://github.com/apache/pulsar/discussions/23034

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org


Re: [D] Ledger and topics [pulsar]

Posted by "ub-3 (via GitHub)" <gi...@apache.org>.
GitHub user ub-3 added a comment to the discussion: Ledger and topics

The problem is that I do not know which topic a ledger belongs to and I want to find this topic.

GitHub link: https://github.com/apache/pulsar/discussions/23034#discussioncomment-10285180

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org


Re: [D] Ledger and topics [pulsar]

Posted by "sbourkeostk (via GitHub)" <gi...@apache.org>.
GitHub user sbourkeostk added a comment to the discussion: Ledger and topics

The above data is from the ledger metadata. You can get this metadata based off the ledger id:
[bookkeeper.getLedgerMetadata(ledger_id)](https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/BookKeeper.html#getLedgerMetadata(long))

GitHub link: https://github.com/apache/pulsar/discussions/23034#discussioncomment-10290884

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org


Re: [D] Ledger and topics [pulsar]

Posted by "ub-3 (via GitHub)" <gi...@apache.org>.
GitHub user ub-3 closed a discussion: Ledger and topics

1. Can one ledger of bookkeeper relate to multiple topics? 
2. And how to find the topics to which it belongs by ledger id.

GitHub link: https://github.com/apache/pulsar/discussions/23034

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org


Re: [D] Ledger and topics [pulsar]

Posted by "sbourkeostk (via GitHub)" <gi...@apache.org>.
GitHub user sbourkeostk added a comment to the discussion: Ledger and topics

1. No.
2. It's in the ledger metadata which is stored in the zookeeper. In the example below the customMetadata entry `pulsar/managed-ledger` points to the managed ledger. `offers/served/persistent/daily-partition-2` represents the pulsar topic: `persistent://offers/served/daily-partition-2`

```
quorumSize: 2
ensembleSize: 2
length: 2915
lastEntryId: 9
state: CLOSED
segment {
  ensembleMember: "10.0.1.35:3181"
  ensembleMember: "10.0.1.31:3181"
  firstEntryId: 0
}
digestType: CRC32C
password: ""
ackQuorumSize: 2
customMetadata {
  key: "component"
  value: "managed-ledger"
}
customMetadata {
  key: "pulsar/managed-ledger"
  value: "offers/served/persistent/daily-partition-2"
}
customMetadata {
  key: "application"
  value: "pulsar"
}
```

GitHub link: https://github.com/apache/pulsar/discussions/23034#discussioncomment-10266282

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org