pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] merlimat commented on a change in pull request #3525: WIP - [Issue 3458: Tag Pulsar ledgers in order to distinguish from other leggers in the same Bookkeeper cluster
Date Tue, 05 Feb 2019 20:34:48 GMT
merlimat commented on a change in pull request #3525: WIP - [Issue 3458: Tag Pulsar ledgers
in order to distinguish from other leggers in the same Bookkeeper cluster
URL: https://github.com/apache/pulsar/pull/3525#discussion_r254034447
 
 

 ##########
 File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
 ##########
 @@ -249,6 +250,10 @@ public ManagedLedgerImpl(ManagedLedgerFactoryImpl factory, BookKeeper
bookKeeper
         this.config = config;
         this.store = store;
         this.name = name;
+        this.ledgerMetadata = ImmutableMap.of(
+                "application", "pulsar".getBytes(StandardCharsets.UTF_8),
+                "component", "managed-ledger".getBytes(StandardCharsets.UTF_8),
+                "topic", name.getBytes(StandardCharsets.UTF_8));
 
 Review comment:
   At this point the name is not really the "topic name" but rather an encoding of it. Eg:
some parts of the topic names are swapped in position (there's a reason for that :) ), and
also the string is url-encoded to avoid issues with ZK paths (eg: `/` need to be escaped).

   
   For that, I'd rather calling that `managed-ledger` instead of topic to avoid confusion.
We already have tools to convert <-> the two different forms anyway.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message