From a8a9fa8822065ad4d955a188c745f8d7dce749bd Mon Sep 17 00:00:00 2001 From: soumitra-st <127247229+soumitra-st@users.noreply.github.com> Date: Tue, 6 Aug 2024 23:48:34 -0700 Subject: [PATCH] Log when table to broker list map is refreshed (#13766) --- .../java/org/apache/pinot/client/DynamicBrokerSelector.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/DynamicBrokerSelector.java b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/DynamicBrokerSelector.java index 84b37a418f96..b349423d83c4 100644 --- a/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/DynamicBrokerSelector.java +++ b/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/DynamicBrokerSelector.java @@ -34,12 +34,15 @@ import org.I0Itec.zkclient.ZkClient; import org.I0Itec.zkclient.serialize.BytesPushThroughSerializer; import org.apache.pinot.client.utils.BrokerSelectorUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Maintains a mapping between table name and list of brokers */ public class DynamicBrokerSelector implements BrokerSelector, IZkDataListener { + private static final Logger LOGGER = LoggerFactory.getLogger(DynamicBrokerSelector.class); private static final Random RANDOM = new Random(); private final AtomicReference>> _tableToBrokerListMapRef = new AtomicReference<>(); @@ -84,6 +87,7 @@ private void refresh() { brokerSet.addAll(brokerList); } _allBrokerListRef.set(new ArrayList<>(brokerSet)); + LOGGER.info("Refreshed table to broker list map: {}", _tableToBrokerListMapRef.get()); } @Nullable