Skip to content
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 · May be fixed by #6
Open

Partition X could not be fully assigned! #5

s905060 opened this issue Jan 7, 2017 · 2 comments · May be fixed by #6

Comments

@s905060
Copy link

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
Copy link
Author

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
Copy link

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

ekoontz pushed a commit to ekoontz/kafka-assigner that referenced this issue Aug 9, 2017
- 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 linked a pull request Aug 12, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants