[ 
https://issues.apache.org/jira/browse/FLINK-3623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15198510#comment-15198510
 ] 

ASF GitHub Bot commented on FLINK-3623:
---------------------------------------

GitHub user greghogan opened a pull request:

    https://github.com/apache/flink/pull/1806

    [FLINK-3623] [runtime] Adjust MurmurHash Algorithm

    Fix "hash *= n" to be "hash = hash * m + n".

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/greghogan/flink 
3623_adjust_murmurhash_algorithm

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1806.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1806
    
----
commit 58dabef04d21c8e2794e5d255b6ff6f6077e273c
Author: Greg Hogan <[email protected]>
Date:   2016-03-16T18:18:03Z

    [FLINK-3623] [runtime] Adjust MurmurHash Algorithm
    
    Fix "hash *= n" to be "hash = hash * m + n".

----


> Adjust MurmurHash algorithm
> ---------------------------
>
>                 Key: FLINK-3623
>                 URL: https://issues.apache.org/jira/browse/FLINK-3623
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Runtime
>    Affects Versions: 1.1.0
>            Reporter: Greg Hogan
>            Assignee: Greg Hogan
>            Priority: Trivial
>
> Flink's MurmurHash implementation differs from the published algorithm.
> From Flink's MathUtils.java:
> {code}
> code *= 0xe6546b64;
> {code}
> The Murmur3_32 algorithm as described by 
> [Wikipedia|https://en.wikipedia.org/wiki/MurmurHash]:
> {code}
> m ← 5
> n ← 0xe6546b64
> hash ← hash × m + n
> {code}
> and in Guava's Murmur3_32HashFunction.java:
> {code}
> h1 = h1 * 5 + 0xe6546b64;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to