reddycharan commented on a change in pull request #1883: Enhance
EnsemblePlacementPolicy and DNSResolverDecorator to log relevant metrics.
URL: https://github.com/apache/bookkeeper/pull/1883#discussion_r246651169
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
##########
@@ -351,4 +352,23 @@ BookieSocketAddress replaceBookie(int ensembleSize,
*/
default void updateBookieInfo(Map<BookieSocketAddress, BookieInfo>
bookieInfoMap) {
}
+
+ /**
+ * returns true if the Ensemble is strictly adhering to placement policy,
+ * like in the case of RackawareEnsemblePlacementPolicy, bookies in the
+ * writeset are from 'minNumRacksPerWriteQuorum' number of racks. And in
the
+ * case of RegionawareEnsemblePlacementPolicy, check for
+ * minimumRegionsForDurability, reppRegionsToWrite, rack distribution
within
+ * a region and other parameters of RegionAwareEnsemblePlacementPolicy.
+ *
+ * @param ensembleList
+ * list of BookieSocketAddress of bookies in the ensemble
+ * @param writeQuorumSize
+ * writeQuorumSize of the ensemble
+ * @param ackQuorumSize
+ * ackQuorumSize of the ensemble
+ * @return
+ */
+ boolean isEnsembleAdheringToPlacementPolicy(List<BookieSocketAddress>
ensembleList, int writeQuorumSize,
Review comment:
will do
----------------------------------------------------------------
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