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_r153758533
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 ##########
 @@ -173,30 +175,35 @@ private LedgerMetadata() {
      * @return SortedMap of Ledger Fragments and the corresponding
      * bookie ensembles that store the entries.
      */
-    public SortedMap<Long, ArrayList<BookieSocketAddress>> getEnsembles() {
+    public TreeMap<Long, ArrayList<BookieSocketAddress>> getEnsembles() {
         return ensembles;
     }
 
-    void setEnsembles(SortedMap<Long, ArrayList<BookieSocketAddress>> 
ensembles) {
+    @Override
+    public NavigableMap<Long, ? extends List<BookieSocketAddress>> 
getAllEnsembles() {
+        return ensembles;
 
 Review comment:
   this should be done in a separate task to make LedgerMetadata implementation 
immutable. This change is more about interfacing existing class. I would prefer 
not changing any implementation.

----------------------------------------------------------------
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