You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ijuma (via GitHub)" <gi...@apache.org> on 2023/10/28 14:56:26 UTC

[PR] MINOR: Avoid a couple of map copies in `KRaftMetadataCache.getPartitionReplicaEndpoints` [kafka]

ijuma opened a new pull request, #14660:
URL: https://github.com/apache/kafka/pull/14660

   Neither the `toMap` or `filter` seem to be necessary.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Avoid a couple of map copies in `KRaftMetadataCache.getPartitionReplicaEndpoints` [kafka]

Posted by "dengziming (via GitHub)" <gi...@apache.org>.
dengziming merged PR #14660:
URL: https://github.com/apache/kafka/pull/14660


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Avoid a couple of map copies in `KRaftMetadataCache.getPartitionReplicaEndpoints` [kafka]

Posted by "dengziming (via GitHub)" <gi...@apache.org>.
dengziming commented on code in PR #14660:
URL: https://github.com/apache/kafka/pull/14660#discussion_r1375676696


##########
core/src/main/scala/kafka/server/MetadataCache.scala:
##########
@@ -25,6 +25,7 @@ import org.apache.kafka.common.{Cluster, Node, TopicPartition, Uuid}
 import org.apache.kafka.server.common.{Features, MetadataVersion}
 
 import java.util
+import scala.collection._

Review Comment:
   Is this change a improvement?



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Avoid a couple of map copies in `KRaftMetadataCache.getPartitionReplicaEndpoints` [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #14660:
URL: https://github.com/apache/kafka/pull/14660#discussion_r1375690405


##########
core/src/main/scala/kafka/server/MetadataCache.scala:
##########
@@ -25,6 +25,7 @@ import org.apache.kafka.common.{Cluster, Node, TopicPartition, Uuid}
 import org.apache.kafka.server.common.{Features, MetadataVersion}
 
 import java.util
+import scala.collection._

Review Comment:
   Yes, it makes it possible to return non immutable maps without copying.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org