kamalcph commented on code in PR #20768:
URL: https://github.com/apache/kafka/pull/20768#discussion_r2480191795
##########
core/src/test/scala/unit/kafka/server/ReplicaManagerQuotasTest.scala:
##########
@@ -341,4 +342,9 @@ class ReplicaManagerQuotasTest {
quota
}
+ def createFetchPartitionStatusMap(tpId: TopicIdPartition, status:
FetchPartitionStatus): util.LinkedHashMap[TopicIdPartition,
FetchPartitionStatus] = {
+ val map = new util.LinkedHashMap[TopicIdPartition, FetchPartitionStatus]
Review Comment:
nit: rename variable `map` -> `statusMap` or something similar
##########
core/src/test/scala/integration/kafka/server/DelayedFetchTest.scala:
##########
@@ -267,4 +269,9 @@ class DelayedFetchTest {
error)
}
+ def createFetchPartitionStatusMap(tpId: TopicIdPartition, status:
FetchPartitionStatus): util.LinkedHashMap[TopicIdPartition,
FetchPartitionStatus] = {
Review Comment:
ditto
##########
core/src/test/scala/unit/kafka/server/ReplicaManagerQuotasTest.scala:
##########
@@ -341,4 +342,9 @@ class ReplicaManagerQuotasTest {
quota
}
+ def createFetchPartitionStatusMap(tpId: TopicIdPartition, status:
FetchPartitionStatus): util.LinkedHashMap[TopicIdPartition,
FetchPartitionStatus] = {
Review Comment:
can the method access specifier be private?
##########
core/src/main/scala/kafka/server/DelayedFetch.scala:
##########
@@ -66,8 +67,7 @@ class DelayedFetch(
*/
override def tryComplete(): Boolean = {
var accumulatedSize = 0
- fetchPartitionStatus.foreach {
- case (topicIdPartition, fetchStatus) =>
+ fetchPartitionStatus.forEach { (topicIdPartition, fetchStatus) =>
Review Comment:
nit: could you update the alignment from L71 - L136? remove one tab.
--
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]