You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/11/22 20:24:21 UTC
[GitHub] ivankelly commented on a change in pull request #1830: Remove
LedgerMetadata methods modifying ensembles
ivankelly commented on a change in pull request #1830: Remove LedgerMetadata methods modifying ensembles
URL: https://github.com/apache/bookkeeper/pull/1830#discussion_r235814067
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
##########
@@ -76,14 +77,15 @@
private final int ensembleSize;
private final int writeQuorumSize;
private final int ackQuorumSize;
+
+ private LedgerMetadataFormat.State state;
private long length;
private long lastEntryId;
private final long ctime;
final boolean storeCtime; // non-private so builder can access for copy
- private LedgerMetadataFormat.State state;
- private TreeMap<Long, ImmutableList<BookieSocketAddress>> ensembles = new TreeMap<>();
- private List<BookieSocketAddress> currentEnsemble;
+ private final NavigableMap<Long, ImmutableList<BookieSocketAddress>> ensembles;
+ private final ImmutableList<BookieSocketAddress> currentEnsemble;
Review comment:
internally. which is fine. And treemap is an implementation of navigablemap. the ensembles are only accessible as navigablemaps. I changed it so I could assign an unmodifiablenavigablemap in it.
----------------------------------------------------------------
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