Skip to content

Conversation

@chrischamberlin
Copy link

Murmur2Partitioner currently doesn't run on Python 3, or when it
is passed a bytearray, and it differs from the Kafka Java implementation in its
handling of leftover bytes (the Java switch statement falls through between
cases).

This PR:

Avoid further type changes when Murmur2Partitioner is passed a byte
array. Change leftover-bytes logic to match the Java switch statement,
and add tests to verify that partition selection matches Java implementation.

Avoid further type changes when Murmur2Partitioner is passed a byte
array.  Change leftover-bytes logic to match the Java switch statement,
and add tests to verify that partition selection matches Java implementation.
dpkp added a commit that referenced this pull request Dec 2, 2015
Fix translation of Java murmur2 code, fix byte encoding for Python 3.
@dpkp dpkp merged commit 4fc15a5 into dpkp:master Dec 2, 2015
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.

2 participants