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

Fix bug causing random partitions with partition key #24

Closed
wants to merge 1 commit into from

Conversation

deanchen
Copy link

Fixes #22

Force partition to be String since ArrayByte.hashcode != ArrayByte.hashcode

Fixes elodina#22

Force partition to be String since Array[Byte](1).hashcode != Array[Byte](1).hashcode
@deanchen
Copy link
Author

Is there a status update on this? This is quite a serious issue since partitioning and therefore ordering does not work properly.

@joestein
Copy link
Contributor

Hey @deanchen I am not sure what the issue is that you are talking about exactly. The change you made sets a new K but without changing the serializer. The way Kafka works is that you have a K,V record that gets put on a topic http://kafka.apache.org/082/javadoc/org/apache/kafka/clients/producer/ProducerRecord.html which has a serializer either http://kafka.apache.org/082/javadoc/org/apache/kafka/common/serialization/ByteArraySerializer.html or http://kafka.apache.org/082/javadoc/org/apache/kafka/common/serialization/Serializer.html or roll your own.

Maybe the issue you are seeing is caused by something else? Can you do a pull request with a test case or something that reproduces the issue succinctly please?

@deanchen deanchen closed this Mar 17, 2020
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 this pull request may close these issues.

Partition key not working properly‏ with hard code keys
2 participants