aloyszhang commented on a change in pull request #14248:
URL: https://github.com/apache/pulsar/pull/14248#discussion_r805225271
##########
File path:
pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java
##########
@@ -77,6 +78,20 @@ public void setConf(Configuration conf) {
bookieMappingCache =
store.getMetadataCache(BookiesRackConfiguration.class);
bookieMappingCache.get(BOOKIE_INFO_ROOT_PATH).join();
+ try {
+ for (Map<String, BookieInfo> bookieMapping :
bookieMappingCache.get(BOOKIE_INFO_ROOT_PATH).get()
+ .map(Map::values).orElse(Collections.emptyList())) {
+ for (String address : bookieMapping.keySet()) {
+ bookieAddressListLastTime.add(BookieId.parse(address));
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("BookieRackAffinityMapping init,
bookieAddressListLastTime {}",
+ bookieAddressListLastTime);
+ }
+ }
+ } catch (InterruptedException | ExecutionException e) {
+ LOG.warn("Failed to init BookieId list", e);
Review comment:
Sure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]