flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggevay <...@git.apache.org>
Subject [GitHub] flink pull request #1517: [FLINK-3477] [runtime] Add hash-based combine stra...
Date Sun, 10 Jul 2016 14:33:49 GMT
Github user ggevay commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1517#discussion_r70182801
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java
---
    @@ -1480,28 +1480,17 @@ public static int getInitialTableSize(int numBuffers, int bufferSize,
int numPar
     	public static byte assignPartition(int bucket, byte numPartitions) {
     		return (byte) (bucket % numPartitions);
     	}
    -	
    +
     	/**
    -	 * This function hashes an integer value. It is adapted from Bob Jenkins' website
    -	 * <a href="http://www.burtleburtle.net/bob/hash/integer.html">http://www.burtleburtle.net/bob/hash/integer.html</a>.
    -	 * The hash function has the <i>full avalanche</i> property, meaning that
every bit of the value to be hashed
    -	 * affects every bit of the hash value. 
    -	 * 
    -	 * @param code The integer to be hashed.
    -	 * @return The hash code for the integer.
    -	 */
    +	 * The level parameter is needed so that we can have different hash functions when we
recursively apply
    +	 * the partitioning, so that the working set eventually fits into memory.
    +     */
     	public static int hash(int code, int level) {
     		final int rotation = level * 11;
     		
     		code = (code << rotation) | (code >>> -rotation);
    --- End diff --
    
    abfd1ff825bf63c5cda11c2b5a556990ca5df3e1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message