Browse Source

KAFKA-3952: Consumer rebalance verifier never succeed due to type mismatch

Author: Wan Wenli <wwl.990@hotmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1612 from swwl1992/ticket-KAFKA-3952-fix-consumer-rebalance-verifier
pull/1630/head
Wan Wenli 8 years ago committed by Guozhang Wang
parent
commit
7a70c1a108
  1. 3
      core/src/main/scala/kafka/tools/VerifyConsumerRebalance.scala

3
core/src/main/scala/kafka/tools/VerifyConsumerRebalance.scala

@ -18,7 +18,6 @@ @@ -18,7 +18,6 @@
package kafka.tools
import joptsimple.OptionParser
import org.I0Itec.zkclient.ZkClient
import org.apache.kafka.common.security._
import kafka.utils.{Logging, ZKGroupTopicDirs, ZkUtils, CommandLineUtils}
@ -117,7 +116,7 @@ object VerifyConsumerRebalance extends Logging { @@ -117,7 +116,7 @@ object VerifyConsumerRebalance extends Logging {
// check if the owner is a valid consumer id
consumerIdsForTopic match {
case Some(consumerIds) =>
if(!consumerIds.contains(partitionOwner)) {
if(!consumerIds.map(c => c.toString).contains(partitionOwner)) {
error(("Owner %s for partition [%s,%d] is not a valid member of consumer " +
"group %s").format(partitionOwner, topic, partition, group))
rebalanceSucceeded = false

Loading…
Cancel
Save