suvodeep-pyne commented on code in PR #14678:
URL: https://github.com/apache/pinot/pull/14678#discussion_r1890547066
##########
pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/src/main/java/org/apache/pinot/plugin/stream/kafka20/KafkaStreamMetadataProvider.java:
##########
@@ -169,14 +172,19 @@ public Map<String, PartitionLagState>
getCurrentPartitionLagState(
@Override
public List<TopicMetadata> getTopics() {
- Map<String, List<PartitionInfo>> namePartitionsMap =
_consumer.listTopics();
- if (namePartitionsMap == null) {
- return Collections.emptyList();
+ try (AdminClient adminClient = createAdminClient()) {
Review Comment:
I was thinking about this and purposely didn't cache it. This API will be
called only for 1 internal use case that is also only from the controller. Do
you think we should cache it now?
Resource wise, It does maintain a NetworkClient and can hold on to
connections etc.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]