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 2021/06/04 15:27:48 UTC

[GitHub] [kafka] wenbingshen commented on a change in pull request #10815: KAFKA-12885: Add the --timeout property to kafka-leader-election.sh

wenbingshen commented on a change in pull request #10815:
URL: https://github.com/apache/kafka/pull/10815#discussion_r645660141



##########
File path: core/src/main/scala/kafka/admin/LeaderElectionCommand.scala
##########
@@ -283,6 +284,14 @@ private final class LeaderElectionCommandOptions(args: Array[String]) extends Co
     .describedAs("election type")
     .withValuesConvertedBy(ElectionTypeConverter)
 
+  val requestTimeout = parser
+    .accepts(
+      "timeout",
+      CommonClientConfigs.REQUEST_TIMEOUT_MS_DOC)

Review comment:
       This configuration is available in AdminClientConfig `AdminClientConfig.REQUEST_TIMEOUT_MS_DOC`. Can we not introduce CommonClientConfigs as we prefer clean code?

##########
File path: core/src/main/scala/kafka/admin/LeaderElectionCommand.scala
##########
@@ -26,6 +26,7 @@ import kafka.utils.CoreUtils
 import kafka.utils.Implicits._
 import kafka.utils.Json
 import kafka.utils.Logging
+import org.apache.kafka.clients.CommonClientConfigs

Review comment:
       AdminClientConfig has been introduced.




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

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