New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition X could not be fully assigned! #5

Open
s905060 opened this Issue Jan 7, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@s905060

s905060 commented Jan 7, 2017

How can we avoid the exception?

./kafka-assignment-generator.sh --zk_string XXXXXXXXXX:2181 --mode PRINT_REASSIGNMENT --disable_rack_awareness --broker_hosts_to_remove XXXXXXXXXX
Exception in thread "main" java.lang.IllegalStateException: Partition 99 could not be fully assigned!
	at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
	at siftscience.kafka.tools.KafkaAssignmentStrategy.assignOrphans(KafkaAssignmentStrategy.java:183)
	at siftscience.kafka.tools.KafkaAssignmentStrategy.getRackAwareAssignment(KafkaAssignmentStrategy.java:56)
	at siftscience.kafka.tools.KafkaTopicAssigner.generateAssignment(KafkaTopicAssigner.java:70)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.printLeastDisruptiveReassignment(KafkaAssignmentGenerator.java:175)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.runTool(KafkaAssignmentGenerator.java:290)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.main(KafkaAssignmentGenerator.java:302)
@s905060

This comment has been minimized.

Show comment
Hide comment
@s905060

s905060 Jan 7, 2017

as well as this

Exception in thread "main" java.lang.IllegalStateException: Topic XXXXXXXX has partition 18 with unexpected replication factor 4
	at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
	at siftscience.kafka.tools.KafkaTopicAssigner.generateAssignment(KafkaTopicAssigner.java:58)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.printLeastDisruptiveReassignment(KafkaAssignmentGenerator.java:175)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.runTool(KafkaAssignmentGenerator.java:290)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.main(KafkaAssignmentGenerator.java:302)

s905060 commented Jan 7, 2017

as well as this

Exception in thread "main" java.lang.IllegalStateException: Topic XXXXXXXX has partition 18 with unexpected replication factor 4
	at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
	at siftscience.kafka.tools.KafkaTopicAssigner.generateAssignment(KafkaTopicAssigner.java:58)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.printLeastDisruptiveReassignment(KafkaAssignmentGenerator.java:175)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.runTool(KafkaAssignmentGenerator.java:290)
	at siftscience.kafka.tools.KafkaAssignmentGenerator.main(KafkaAssignmentGenerator.java:302)
@BrianGallew

This comment has been minimized.

Show comment
Hide comment
@BrianGallew

BrianGallew Jan 20, 2017

I'm getting this also. In my case, it's pretty clearly caused by having partitions with 3 replicas, but only 2 racks.

BrianGallew commented Jan 20, 2017

I'm getting this also. In my case, it's pretty clearly caused by having partitions with 3 replicas, but only 2 racks.

ekoontz added a commit to ekoontz/kafka-assigner that referenced this issue Aug 9, 2017

Fix SiftScience#5
- modify getRackAwareAssignment(): wrap body within a 'while () { try {} .. catch {}}' with a decrementing initial node capacity.
- in assignOrphans(), sort candidates by current load rather than simply an unsorted list.
- add a new test 'testClusterRebalance'

@ekoontz ekoontz referenced a pull request that will close this issue Aug 12, 2017

Open

Fix issue 5 #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment