You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2014/04/23 03:35:23 UTC

svn commit: r1589330 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java

Author: sershe
Date: Wed Apr 23 01:35:23 2014
New Revision: 1589330

URL: http://svn.apache.org/r1589330
Log:
HIVE-6924 : MapJoinKeyBytes::hashCode() should use Murmur hash (Sergey Shelukhin, reviewed by Ashutosh Chauhan and Gopal V)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java?rev=1589330&r1=1589329&r2=1589330&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java Wed Apr 23 01:35:23 2014
@@ -21,6 +21,8 @@ package org.apache.hadoop.hive.ql.exec.p
 import java.io.ObjectOutputStream;
 import java.util.Arrays;
 
+import org.apache.hadoop.util.hash.MurmurHash;
+
 /**
  * Size-optimized implementation of MapJoinKeyBase. MJK only needs to support equality and
  * hashCode, so for simple cases we can write the requisite writables that are part of the
@@ -28,6 +30,7 @@ import java.util.Arrays;
  */
 @SuppressWarnings("deprecation")
 public class MapJoinKeyBytes extends MapJoinKey {
+  private static final MurmurHash hash = (MurmurHash)MurmurHash.getInstance();
   /**
    * First byte is field count. The rest is written using BinarySortableSerDe.
    */
@@ -51,7 +54,7 @@ public class MapJoinKeyBytes extends Map
 
   @Override
   public int hashCode() {
-    return Arrays.hashCode(array);
+    return hash.hash(array);
   }
 
   @Override