移除topic 限流

This commit is contained in:
许晓东
2021-11-27 20:49:46 +08:00
parent 34c87997d1
commit e881c58a8f
5 changed files with 40 additions and 16 deletions

View File

@@ -224,6 +224,16 @@ class TopicConsole(config: KafkaConfig) extends KafkaConsole(config: KafkaConfig
}).asInstanceOf[(Boolean, String)]
}
def clearThrottle(topic: String): (Boolean, String) = {
withAdminClientAndCatchError(admin => {
clearTopicLevelThrottles(admin, Collections.singleton(topic).asScala.toSet)
(true, "")
}, e => {
log.error("clearThrottle error, ", e)
(false, e.getMessage)
}).asInstanceOf[(Boolean, String)]
}
/**
* Get the current replica assignments for some topics.
*