apoorvmittal10 commented on code in PR #17473:
URL: https://github.com/apache/kafka/pull/17473#discussion_r1803612169
##########
core/src/main/scala/kafka/network/SocketServer.scala:
##########
@@ -929,17 +936,17 @@ private[kafka] class Processor(
private object ConnectionId {
def fromString(s: String): Option[ConnectionId] = s.split("-") match {
- case Array(local, remote, index) =>
BrokerEndPoint.parseHostPort(local).flatMap { case (localHost, localPort) =>
+ case Array(local, remote, processorId, index) =>
BrokerEndPoint.parseHostPort(local).flatMap { case (localHost, localPort) =>
BrokerEndPoint.parseHostPort(remote).map { case (remoteHost,
remotePort) =>
- ConnectionId(localHost, localPort, remoteHost, remotePort,
Integer.parseInt(index))
+ ConnectionId(localHost, localPort, remoteHost, remotePort,
Integer.parseInt(processorId), Integer.parseInt(index))
}
}
case _ => None
}
}
- private[network] case class ConnectionId(localHost: String, localPort: Int,
remoteHost: String, remotePort: Int, index: Int) {
- override def toString: String =
s"$localHost:$localPort-$remoteHost:$remotePort-$index"
+ private[network] case class ConnectionId(localHost: String, localPort: Int,
remoteHost: String, remotePort: Int, processorId: Int, index: Int) {
Review Comment:
Yeah it make sense. I started it and realized we also need to port
BrokerEndpoint.scala and corresponding changes. Shall I take that in follow up
PR?
--
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]