Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/main/scala/kafka/controller/KafkaController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,7 @@ class KafkaController(val config: KafkaConfig,
processIsrChangeNotification()
case Startup =>
processStartup()
case _ =>
}
} catch {
case e: ControllerMovedException =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ class GroupCoordinator(val brokerId: Int,
val memberMetadata = group.get(memberId)
responseCallback(memberMetadata.assignment, Errors.NONE)
completeAndScheduleNextHeartbeatExpiration(group, group.get(memberId))

case Dead =>
// this case is already handled, so raise exception
throw new IllegalStateException("can't reach this line")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we provide a more useful message? These impossible states have a funny way of becoming possible over time 😉 . Maybe something like this?

throw new IllegalStateException(s"Reached unexpected condition for Dead group $groupId")

We can probably remove the comment if the exception message is already clear.

}
}
}
Expand Down Expand Up @@ -533,6 +537,10 @@ class GroupCoordinator(val brokerId: Int,
val member = group.get(memberId)
completeAndScheduleNextHeartbeatExpiration(group, member)
responseCallback(Errors.NONE)

case Dead =>
// this case is already handled, so raise exception
throw new IllegalStateException("can't reach this line")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/kafka/server/KafkaConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import kafka.utils.CoreUtils
import kafka.utils.Implicits._
import org.apache.kafka.clients.CommonClientConfigs
import org.apache.kafka.common.Reconfigurable
import org.apache.kafka.common.config.ConfigDef.{ConfigKey, ValidList, Validator}
import org.apache.kafka.common.config.ConfigDef.{ConfigKey, ValidList}
import org.apache.kafka.common.config.internals.BrokerSecurityConfigs
import org.apache.kafka.common.config.{AbstractConfig, ConfigDef, ConfigException, SaslConfigs, SslClientAuth, SslConfigs, TopicConfig}
import org.apache.kafka.common.metrics.Sensor
Expand Down
1 change: 0 additions & 1 deletion core/src/main/scala/kafka/utils/CommandLineUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.Properties

import joptsimple.{OptionParser, OptionSet, OptionSpec}
import org.apache.kafka.common.utils.AppInfoParser

import scala.collection.Set

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package kafka.server

import java.nio.ByteBuffer
import java.util.{Collections, LinkedHashMap, Optional, Properties}
import java.util.concurrent.{Executors, Future, TimeUnit}

Expand Down