Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-139

hashCode does not work for byte[]

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • storm-core
    • None

    Description

      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

      Attachments

        Activity

          People

            dagit Derek Dagit
            xumingming James Xu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: