hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1589330 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinKeyBytes.java
Date Wed, 23 Apr 2014 01:35:23 GMT
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



Mime
View raw message