hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1126593 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java
Date Mon, 23 May 2011 17:09:07 GMT
Author: stack
Date: Mon May 23 17:09:07 2011
New Revision: 1126593

URL: http://svn.apache.org/viewvc?rev=1126593&view=rev
Log:
HBASE-3908 TableSplit not implementing hashCode problem

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1126593&r1=1126592&r2=1126593&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Mon May 23 17:09:07 2011
@@ -15,6 +15,7 @@ Release 0.90.4 - Unreleased
    HBASE-3905  HBaseAdmin.createTableAsync() should check for invalid split
                keys. (Ted Yu)
    HBASE-3912  [Stargate] Columns not handle by Scan
+   HBASE-3908  TableSplit not implementing "hashCode" problem (Daniel Iancu)
 
   IMPROVEMENT
    HBASE-3882  hbase-config.sh needs to be updated so it can auto-detects the

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java?rev=1126593&r1=1126592&r2=1126593&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java Mon
May 23 17:09:07 2011
@@ -22,6 +22,7 @@ package org.apache.hadoop.hbase.mapreduc
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.Arrays;
 
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -183,4 +184,13 @@ implements Writable, Comparable<TableSpl
       Bytes.equals(endRow, ((TableSplit)o).endRow) &&
       regionLocation.equals(((TableSplit)o).regionLocation);
   }
+
+    @Override
+    public int hashCode() {
+      int result = tableName != null ? Arrays.hashCode(tableName) : 0;
+      result = 31 * result + (startRow != null ? Arrays.hashCode(startRow) : 0);
+      result = 31 * result + (endRow != null ? Arrays.hashCode(endRow) : 0);
+      result = 31 * result + (regionLocation != null ? regionLocation.hashCode() : 0);
+      return result;
+    }
 }



Mime
View raw message