hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r610698 - in /lucene/hadoop/trunk/src/contrib/hbase: ./ src/java/org/apache/hadoop/hbase/
Date Thu, 10 Jan 2008 06:57:04 GMT
Author: stack
Date: Wed Jan  9 22:57:00 2008
New Revision: 610698

URL: http://svn.apache.org/viewvc?rev=610698&view=rev
Log:
HADOOP-2553 Don't make Long objects calculating hbase type hash codes

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogKey.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Wed Jan  9 22:57:00 2008
@@ -162,6 +162,7 @@
                (Edward Yoon via Stack)
    HADOOP-2450 Show version (and svn revision) in hbase web ui
    HADOOP-2472 Range selection using filter (Edward Yoon via Stack)
+   HADOOP-2553 Don't make Long objects calculating hbase type hash codes
                
 
 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java Wed Jan
 9 22:57:00 2008
@@ -332,13 +332,13 @@
             // equal to the oldest pending region operation
             TreeSet<Long> sequenceNumbers =
               new TreeSet<Long>(this.outputfiles.headMap(
-                (oldestOutstandingSeqNum + Long.valueOf(1L))).keySet());
+                (Long.valueOf(oldestOutstandingSeqNum.longValue() + 1L))).keySet());
             // Now remove old log files (if any)
             if (LOG.isDebugEnabled()) {
               // Find region associated with oldest key -- helps debugging.
               Text oldestRegion = null;
               for (Map.Entry<Text, Long> e: this.lastSeqWritten.entrySet()) {
-                if (e.getValue().longValue() == oldestOutstandingSeqNum) {
+                if (e.getValue().longValue() == oldestOutstandingSeqNum.longValue()) {
                   oldestRegion = e.getKey();
                   break;
                 }

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogKey.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogKey.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogKey.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogKey.java Wed
Jan  9 22:57:00 2008
@@ -102,7 +102,7 @@
   public int hashCode() {
     int result = this.regionName.hashCode();
     result ^= this.row.hashCode(); 
-    result ^= Long.valueOf(this.logSeqNum).hashCode();
+    result ^= this.logSeqNum;
     return result;
   }
 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
Wed Jan  9 22:57:00 2008
@@ -82,7 +82,7 @@
   
   private void setHashCode() {
     int result = this.regionName.hashCode();
-    result ^= Long.valueOf(this.regionId).hashCode();
+    result ^= this.regionId;
     result ^= this.startKey.hashCode();
     result ^= this.endKey.hashCode();
     result ^= Boolean.valueOf(this.offLine).hashCode();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java Wed
Jan  9 22:57:00 2008
@@ -229,14 +229,12 @@
       // TODO: If get is of a particular version -- numVersions == 1 -- we
       // should be able to avoid all of the tailmap creations and iterations
       // below.
-      HStoreKey curKey = new HStoreKey(key);
-      SortedMap<HStoreKey, byte []> tailMap = map.tailMap(curKey);
+      SortedMap<HStoreKey, byte []> tailMap = map.tailMap(key);
       for (Map.Entry<HStoreKey, byte []> es: tailMap.entrySet()) {
         HStoreKey itKey = es.getKey();
-        if (itKey.matchesRowCol(curKey)) {
+        if (itKey.matchesRowCol(key)) {
           if (!HLogEdit.isDeleted(es.getValue())) {
             result.add(tailMap.get(itKey));
-            curKey.setVersion(itKey.getTimestamp() - 1);
           }
         }
         if (numVersions > 0 && result.size() >= numVersions) {

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
Wed Jan  9 22:57:00 2008
@@ -995,7 +995,7 @@
     int result = this.dir.hashCode();
     result ^= this.encodedRegionName.hashCode();
     result ^= this.colFamily.hashCode();
-    result ^= Long.valueOf(this.fileId).hashCode();
+    result ^= this.fileId;
     return result;
   }
 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
Wed Jan  9 22:57:00 2008
@@ -219,7 +219,7 @@
   public int hashCode() {
     int result = this.row.hashCode();
     result ^= this.column.hashCode();
-    result ^= Long.valueOf(this.timestamp).hashCode();
+    result ^= this.timestamp;
     return result;
   }
 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java?rev=610698&r1=610697&r2=610698&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java Wed
Jan  9 22:57:00 2008
@@ -354,7 +354,7 @@
     @Override
     public int hashCode() {
       int result = this.getLeaseName().hashCode();
-      result ^= Long.valueOf(this.lastUpdate).hashCode();
+      result ^= this.lastUpdate;
       return result;
     }
     



Mime
View raw message