解除限流速率配置

This commit is contained in:
许晓东
2021-11-25 10:55:37 +08:00
parent 1b028fcb4f
commit 73fed3face
9 changed files with 182 additions and 15 deletions

View File

@@ -221,4 +221,14 @@ class OperationConsole(config: KafkaConfig, topicConsole: TopicConsole,
(false, e.getMessage)
}).asInstanceOf[(Boolean, String)]
}
def clearBrokerLevelThrottles(brokers: util.Set[Int]): (Boolean, String) = {
withAdminClientAndCatchError(admin => {
ReassignPartitionsCommand.clearBrokerLevelThrottles(admin, brokers.asScala.toSet)
(true, "")
}, e => {
log.error("clearBrokerLevelThrottles error.", e)
(false, e.getMessage)
}).asInstanceOf[(Boolean, String)]
}
}