diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java index 0ba4f5080e606c..bfb47ff50acb80 100644 --- a/pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java +++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java @@ -124,11 +124,10 @@ public synchronized void setConf(Configuration conf) { store.registerListener(this::handleUpdates); try { - var racksWithHost = bookieMappingCache.get(BOOKIE_INFO_ROOT_PATH) + BookiesRackConfiguration racksWithHost = bookieMappingCache.get(BOOKIE_INFO_ROOT_PATH) .thenApply(optRes -> optRes.orElseGet(BookiesRackConfiguration::new)) .get(); - - for (var bookieMapping : racksWithHost.values()) { + for (Map bookieMapping : racksWithHost.values()) { for (String address : bookieMapping.keySet()) { bookieAddressListLastTime.add(BookieId.parse(address)); }