poseidon icon indicating copy to clipboard operation
poseidon copied to clipboard

Add Ruby implementation of Kafka's partition hasher (based on key). Test

Open ovy-altiscale opened this issue 10 years ago • 3 comments

that it matches results from Java.

Not hooked up yet (future commits), but can already be used manually by a client.

Use case is to pick the partition where one knows a certain class of keys will be found.

ovy-altiscale avatar Dec 07 '15 18:12 ovy-altiscale

It's interesting to note the C client (librdkafka) uses a different partition hasher to the java client. I think that the C client implementation is the same as the one in Poseidon. It would still be nice to have this, though.

Ben-M avatar Jan 11 '16 09:01 Ben-M

@Ben-M thanks for the notice. I don't know why rdkafka chose to go that route, given that "similar in spirit" doesn't seem to actually match the Scala.

In any event, for code interacting with the Java client something of this nature is needed. Note that I haven't hooked it up as any kind of default; in my code I instantiate one explicitly to compute partitions. I suppose it could be renamed to JavaCompatibleHasher if we're concerned about confusion.

ovy-altiscale avatar Jan 13 '16 19:01 ovy-altiscale

I encoutered the same problem "All checks have failed", and even the details are the same. Do you have any idea to solve this problem?

liukgg avatar Jan 14 '16 07:01 liukgg