This is an automated email from the ASF dual-hosted git repository.
showuon pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 7e71483aed MINOR: fix doc (#12243)
7e71483aed is described below
commit 7e71483aed3db3979688c8ad43529fddaa0bd601
Author: Kvicii <[email protected]>
AuthorDate: Fri Jun 3 15:56:13 2022 +0800
MINOR: fix doc (#12243)
Reviewers: Luke Chen <[email protected]>
---
core/src/main/scala/kafka/controller/KafkaController.scala | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/src/main/scala/kafka/controller/KafkaController.scala
b/core/src/main/scala/kafka/controller/KafkaController.scala
index c6c5bf984c..289de9ab29 100644
--- a/core/src/main/scala/kafka/controller/KafkaController.scala
+++ b/core/src/main/scala/kafka/controller/KafkaController.scala
@@ -853,7 +853,7 @@ class KafkaController(val config: KafkaConfig,
* Attempt to elect a replica as leader for each of the given partitions.
* @param partitions The partitions to have a new leader elected
* @param electionType The type of election to perform
- * @param electionTrigger The reason for tigger this election
+ * @param electionTrigger The reason for trigger this election
* @return A map of failed and successful elections. The keys are the topic
partitions and the corresponding values are
* either the exception that was thrown or new leader & ISR.
*/
@@ -903,7 +903,7 @@ class KafkaController(val config: KafkaConfig,
// update controller cache with delete topic information
val curBrokerAndEpochs = zkClient.getAllBrokerAndEpochsInCluster
val (compatibleBrokerAndEpochs, incompatibleBrokerAndEpochs) =
partitionOnFeatureCompatibility(curBrokerAndEpochs)
- if (!incompatibleBrokerAndEpochs.isEmpty) {
+ if (incompatibleBrokerAndEpochs.nonEmpty) {
warn("Ignoring registration of new brokers due to incompatibilities with
finalized features: " +
incompatibleBrokerAndEpochs.map { case (broker, _) => broker.id
}.toSeq.sorted.mkString(","))
}
@@ -1588,7 +1588,7 @@ class KafkaController(val config: KafkaConfig,
if (newBrokerIds.nonEmpty) {
val (newCompatibleBrokerAndEpochs, newIncompatibleBrokerAndEpochs) =
partitionOnFeatureCompatibility(newBrokerAndEpochs)
- if (!newIncompatibleBrokerAndEpochs.isEmpty) {
+ if (newIncompatibleBrokerAndEpochs.nonEmpty) {
warn("Ignoring registration of new brokers due to incompatibilities
with finalized features: " +
newIncompatibleBrokerAndEpochs.map { case (broker, _) => broker.id
}.toSeq.sorted.mkString(","))
}
@@ -1600,7 +1600,7 @@ class KafkaController(val config: KafkaConfig,
onBrokerFailure(bouncedBrokerIdsSorted)
val (bouncedCompatibleBrokerAndEpochs,
bouncedIncompatibleBrokerAndEpochs) =
partitionOnFeatureCompatibility(bouncedBrokerAndEpochs)
- if (!bouncedIncompatibleBrokerAndEpochs.isEmpty) {
+ if (bouncedIncompatibleBrokerAndEpochs.nonEmpty) {
warn("Ignoring registration of bounced brokers due to
incompatibilities with finalized features: " +
bouncedIncompatibleBrokerAndEpochs.map { case (broker, _) =>
broker.id }.toSeq.sorted.mkString(","))
}