[
https://issues.apache.org/jira/browse/S4-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173159#comment-13173159
]
Matthieu Morel commented on S4-30:
----------------------------------
Thanks for reporting this.
Unfortunately, I was not able to reproduce the problem. Do you have a test case?
I'm a bit surprised because the adapted version of the algorithm we use strips
64 bits values to unsigned 32 bits integers. (see:
https://github.com/s4/s4/blob/master/s4-core/src/main/java/org/apache/s4/dispatcher/partitioner/HashAlgorithm.java#L145)
> DefaultHasher hashes keys to negative number
> --------------------------------------------
>
> Key: S4-30
> URL: https://issues.apache.org/jira/browse/S4-30
> Project: Apache S4
> Issue Type: Bug
> Affects Versions: 0.4
> Environment: All - Windows and Linux
> Reporter: Quoc Nguyen
> Priority: Blocker
>
> DefaultHasher uses HashAlgorithm hashAlgorithm = HashAlgorithm.FNV1_64_HASH;
> which hashes key strings such as 118+18233, 118+17360, 118+17258, 118+18147
> and 118+18121 and many more to negative values which the DefaultPartitioner
> (int partitionId = (int) (hasher.hash(stringValue) % partitionCount);) tries
> to partition the key to incorrect partition.
> Workaround:
> None - stream has those keys, they will get dropped because the partitioner
> cannot correctly partition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira