ijuma commented on code in PR #20768:
URL: https://github.com/apache/kafka/pull/20768#discussion_r2462900116
##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -1733,7 +1733,7 @@ class ReplicaManager(val config: KafkaConfig,
)
// create a list of (topic, partition) pairs to use as keys for this
delayed fetch operation
- val delayedFetchKeys = fetchPartitionStatus.map { case (tp, _) => new
TopicPartitionOperationKey(tp) }.toList
+ val delayedFetchKeys = fetchPartitionStatus.asScala.map { case (tp, _)
=> new TopicPartitionOperationKey(tp) }.toList
Review Comment:
Why do we convert to a Scala List if we convert to a Java collection right
after? We should probably use Java's Stream here and avoid the Scala
collections altogether.
--
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]