sijie commented on a change in pull request #788: Issue 787: Client should be 
able to get ledger metadata from Handles.
URL: https://github.com/apache/bookkeeper/pull/788#discussion_r153902716
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 ##########
 @@ -279,6 +294,11 @@ public void addEnsemble(long startEntryId, 
ArrayList<BookieSocketAddress> ensemb
         return ensembles.get(ensembles.headMap(entryId + 1).lastKey());
     }
 
+    @Override
+    public List<BookieSocketAddress> getEnsembleAt(long entryId) {
+        return getEnsemble(entryId);
 
 Review comment:
   it is not exposing *new* client internals. the exposure is already there in 
LedgerHandle. This interface doesn't change anything we have been exposed.
   
   The reason I don't want constructing a new ArrayList is because this list 
should be constructed using ImmutableList during we construct the 
LedgerMetadata. it should not be done on individual gets. so this makes sense 
to be part of making ledger metadata immutable, not be part of an API 
abstraction. If you feel strong about this, I can spend time on haveing a 
follow up issue to make ledger metadata immutable.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to