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 2020/06/18 17:10:14 UTC

[GitHub] [kafka] cmccabe commented on a change in pull request #8891: KAFKA-10143; Restore ability to change throttle of active reassignment

cmccabe commented on a change in pull request #8891:
URL: https://github.com/apache/kafka/pull/8891#discussion_r442378048



##########
File path: core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala
##########
@@ -930,6 +935,38 @@ object ReassignPartitionsCommand extends Logging {
     (brokerListToReassign, topicsToReassign)
   }
 
+  /**
+   * The entry point for --alter-throttles. At least one throttle value must be provided.
+   *
+   * @param admin The Admin instance to use
+   * @param interBrokerThrottle The new inter-broker throttle or -1 to leave it unchanged
+   * @param logDirThrottle The new alter-log-dir throttle or -1 to leave it unchanged
+   */
+  def alterThrottles(admin: Admin,
+                     interBrokerThrottle: Long,
+                     logDirThrottle: Long): Unit = {
+    if (interBrokerThrottle < 0 && logDirThrottle < 0) {
+      throw new TerseReassignmentFailureException("No valid throttle values provided to --alter-throttle")

Review comment:
       It would be good to include the flags needed to pass in a throttle in this message




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