MINOR: fix doc
Reviewers: Luke Chen
@@ -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(","))
}
