From 75eb420a514c414a293e70c0f0a31930e577b557 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Thu, 15 Aug 2024 10:47:13 +0800 Subject: [PATCH] [fix][build] Remove var Signed-off-by: Zixuan Liu --- .../bookie/rackawareness/BookieRackAffinityMapping.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)); }