apoorvmittal10 commented on code in PR #17473:
URL: https://github.com/apache/kafka/pull/17473#discussion_r1803717153


##########
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:
   I have created following jira: 
https://issues.apache.org/jira/browse/KAFKA-17813. Working on it, will send the 
patch. It's a medium refactoring change with tests where BrokerEndpoint is 
moved as well to java.



-- 
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]

Reply via email to