You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "James Xu (JIRA)" <ji...@apache.org> on 2013/12/15 07:06:06 UTC
[jira] [Created] (STORM-139) hashCode does not work for byte[]
James Xu created STORM-139:
------------------------------
Summary: hashCode does not work for byte[]
Key: STORM-139
URL: https://issues.apache.org/jira/browse/STORM-139
Project: Apache Storm (Incubating)
Issue Type: Bug
Reporter: James Xu
Priority: Minor
https://github.com/nathanmarz/storm/issues/245
Storm should use a different hashCode method when getting the hash for a byte[] array, since the default one uses the object identity. Should check the behavior on other arrays as well
----------
xiaokang: I tested byte[] and other arrays. The hashCode of array is the array object identity.
I alse tested that java.util.Arrays.hashCode(xx[]) is based of the array element's hash code. It maybe ok change the list-hash-code function of tuple.clj to fix the problem.
----------
Sirwellington: you may want to read this:
http://martin.kleppmann.com/2012/06/18/java-hashcode-unsafe-for-distributed-systems.html
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)