[ https://issues.apache.org/jira/browse/KAFKA-821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neha Narkhede updated KAFKA-821: -------------------------------- Labels: kafka-0.8 p1 (was: ) > specifying a non-existent partition to ./bin/kafka-reassign-partitions.sh > breaks all reassignment ops > ----------------------------------------------------------------------------------------------------- > > Key: KAFKA-821 > URL: https://issues.apache.org/jira/browse/KAFKA-821 > Project: Kafka > Issue Type: Bug > Components: tools > Affects Versions: 0.8 > Reporter: Scott Clasen > Assignee: Neha Narkhede > Labels: kafka-0.8, p1 > > From my ML post...the workaround is to manually delete > /admin/reassign_partitions from ZK, that node contained a json with an empty > partitions array. > Have 3 brokers running. Ids 25,26,27 > ./bin/kafka-create-topic.sh --replica 3 --topic first-cluster-topic > --zookeeper <zk>:2181/kafka > Seems fine, can send/receive, etc.. > Kill 27, start 28. Try to reassign the single partition topic with the > following json. > Contains an error. partition should be 0 not 1. > {"partitions": > [{"topic": "first-cluster-topic", "partition": 1, "replicas": [25,26,28] }] > } > ./bin/kafka-reassign-partitions.sh --zookeeper ... -path-to-json-file > reassign.json > 2013-03-21 12:14:46,170] INFO zookeeper state changed (SyncConnected) > (org.I0Itec.zkclient.ZkClient) > [2013-03-21 12:14:46,310] ERROR Skipping reassignment of partition > [first-cluster-topic,1] since it doesn't exist > (kafka.admin.ReassignPartitionsCommand) > Successfully started reassignment of partitions Map([first-cluster-topic,1] > -> List(25, 26, 28)) > [2013-03-21 12:14:46,665] INFO Terminate ZkClient event thread. > (org.I0Itec.zkclient.ZkEventThread) > [2013-03-21 12:14:46,780] INFO Session: 0x13d8a63a3760007 closed > (org.apache.zookeeper.ZooKeeper) > [2013-03-21 12:14:46,780] INFO EventThread shut down > (org.apache.zookeeper.ClientCnxn) > Ok, fix the JSON > {"partitions": > [{"topic": "first-cluster-topic", "partition": 0, "replicas": [25,26,28] }] > } > ./bin/kafka-reassign-partitions.sh --zookeeper ... -path-to-json-file > reassign.json > [2013-03-21 12:17:34,367] INFO zookeeper state changed (SyncConnected) > (org.I0Itec.zkclient.ZkClient) > Partitions reassignment failed due to Partition reassignment currently in > progress for Map(). Aborting operation > kafka.common.AdminCommandFailedException: Partition reassignment currently > in progress for Map(). Aborting operation > at > kafka.admin.ReassignPartitionsCommand.reassignPartitions(ReassignPartitionsCommand.scala:91) > at > kafka.admin.ReassignPartitionsCommand$.main(ReassignPartitionsCommand.scala:65) > at > kafka.admin.ReassignPartitionsCommand.main(ReassignPartitionsCommand.scala) > ./bin/kafka-check-reassignment-status.sh --zookeeper ... > --path-to-json-file reassign.json > [2013-03-21 12:20:40,607] INFO zookeeper state changed (SyncConnected) > (org.I0Itec.zkclient.ZkClient) > Exception in thread "main" java.lang.ClassCastException: > scala.collection.immutable.Map$Map1 cannot be cast to > [Lscala.collection.Map; > at > kafka.admin.CheckReassignmentStatus$.main(CheckReassignmentStatus.scala:44) > at kafka.admin.CheckReassignmentStatus.main(CheckReassignmentStatus.scala) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira