sijie commented on a change in pull request #301: Issue-299 
EnsemblePlacementPolicy in 4.5 is not compatible with 4.4 clients
URL: https://github.com/apache/bookkeeper/pull/301#discussion_r129761496
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
 ##########
 @@ -89,7 +99,27 @@ public EnsemblePlacementPolicy 
initialize(ClientConfiguration conf,
      * @throws BKNotEnoughBookiesException if not enough bookies available.
      * @return the 
java.util.ArrayList<org.apache.bookkeeper.net.BookieSocketAddress>
      */
-    public ArrayList<BookieSocketAddress> newEnsemble(int ensembleSize, int 
writeQuorumSize, int ackQuorumSize, Map<String, byte[]> customMetadata, 
Set<BookieSocketAddress> excludeBookies) throws BKNotEnoughBookiesException;
+    public default ArrayList<BookieSocketAddress> newEnsemble(int 
ensembleSize, int writeQuorumSize,
+        int ackQuorumSize, Map<String, byte[]> customMetadata, 
Set<BookieSocketAddress> excludeBookies) throws BKNotEnoughBookiesException {
+        return newEnsemble(ensembleSize, ackQuorumSize, excludeBookies);
+    }
+
+    /**
+     * Legacy method introduce for compatibility with 4.4 clients
+     * @param ensembleSize
+     *          Ensemble Size
+     * @param quorumSize
+     *          Quorum Size
+     * @param excludeBookies
+     * @return
+     * @throws 
org.apache.bookkeeper.client.BKException.BKNotEnoughBookiesException
+     *
+     * @see #newEnsemble(int, int, int, java.util.Map, java.util.Set)
+     */
+    public default ArrayList<BookieSocketAddress> newEnsemble(int 
ensembleSize, int quorumSize,
 
 Review comment:
   see my comments as above. 
   
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to