You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/07/01 07:17:57 UTC

[GitHub] [kafka] showuon commented on a diff in pull request #12368: [MINOR] Dead code from BrokerEndPoint removed

showuon commented on code in PR #12368:
URL: https://github.com/apache/kafka/pull/12368#discussion_r911682604


##########
core/src/main/scala/kafka/cluster/BrokerEndPoint.scala:
##########
@@ -36,23 +35,6 @@ object BrokerEndPoint {
       case _ => None
     }
   }
-  
-  /**
-   * BrokerEndPoint URI is host:port or [ipv6_host]:port
-   * Note that unlike EndPoint (or listener) this URI has no security information.
-   */
-  def createBrokerEndPoint(brokerId: Int, connectionString: String): BrokerEndPoint = {
-    parseHostPort(connectionString).map { case (host, port) => new BrokerEndPoint(brokerId, host, port) }.getOrElse {
-      throw new KafkaException("Unable to parse " + connectionString + " to a broker endpoint")
-    }
-  }
-
-  def readFrom(buffer: ByteBuffer): BrokerEndPoint = {

Review Comment:
   I'm wondering if the `readFrom` is unused, why does `writeTo` still exist? We only need to write, and no need to read? Could you help confirm it? Thanks.



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