hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r784503 - in /hadoop/hbase/trunk: ./ src/java/org/apache/hadoop/hbase/regionserver/ src/test/org/apache/hadoop/hbase/regionserver/
Date Sun, 14 Jun 2009 03:17:30 GMT
Author: stack
Date: Sun Jun 14 03:17:19 2009
New Revision: 784503

URL: http://svn.apache.org/viewvc?rev=784503&view=rev
Log:
HBASE-1518 Delete Trackers using compareRow, should just use raw binary comparator

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/GetDeleteTracker.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/QueryMatcher.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/ScanDeleteTracker.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGetDeleteTracker.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=784503&r1=784502&r2=784503&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sun Jun 14 03:17:19 2009
@@ -169,6 +169,8 @@
    HBASE-1491  ZooKeeper errors: "Client has seen zxid 0xe our last zxid is 0xd"
    HBASE-1499  Fix javadoc warnings after HBASE-1304 commit (Lars George via Stack)
    HBASE-1504  Remove left-over debug from 1304 commit
+   HBASE-1518  Delete Trackers using compareRow, should just use raw
+               binary comparator (Jon Gray via Stack)
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/GetDeleteTracker.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/GetDeleteTracker.java?rev=784503&r1=784502&r2=784503&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/GetDeleteTracker.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/GetDeleteTracker.java
Sun Jun 14 03:17:19 2009
@@ -45,15 +45,11 @@
   private Iterator<Delete> iterator;
   private Delete delete = null;
 
-  private KeyValue.KeyComparator comparator;
-
   /**
    * Constructor
    * @param comparator
    */
-  public GetDeleteTracker(KeyValue.KeyComparator comparator) {
-    this.comparator = comparator;
-  }
+  public GetDeleteTracker() {}
 
   /**
    * Add the specified KeyValue to the list of deletes to check against for
@@ -105,7 +101,7 @@
     }
 
     // Check column
-    int ret = comparator.compareRows(buffer, qualifierOffset, qualifierLength,
+    int ret = Bytes.compareTo(buffer, qualifierOffset, qualifierLength,
         this.delete.buffer, this.delete.qualifierOffset, 
         this.delete.qualifierLength);
     if(ret <= -1) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/QueryMatcher.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/QueryMatcher.java?rev=784503&r1=784502&r2=784503&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/QueryMatcher.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/QueryMatcher.java Sun
Jun 14 03:17:19 2009
@@ -130,7 +130,7 @@
     this.tr = get.getTimeRange();
     this.oldestStamp = System.currentTimeMillis() - ttl;
     this.rowComparator = rowComparator;
-    this.deletes =  new GetDeleteTracker(rowComparator);
+    this.deletes =  new GetDeleteTracker();
     this.startKey = KeyValue.createFirstOnRow(row);
     // Single branch to deal with two types of Gets (columns vs all in family)
     if(columns == null || columns.size() == 0) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/ScanDeleteTracker.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/ScanDeleteTracker.java?rev=784503&r1=784502&r2=784503&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/ScanDeleteTracker.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/ScanDeleteTracker.java
Sun Jun 14 03:17:19 2009
@@ -21,6 +21,7 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * This class is responsible for the tracking and enforcement of Deletes
@@ -78,7 +79,7 @@
 
       if(deleteBuffer != null && type < deleteType) {
         // same column, so ignore less specific delete
-        if(comparator.compareRows(deleteBuffer, deleteOffset, deleteLength,
+        if(Bytes.compareTo(deleteBuffer, deleteOffset, deleteLength,
             buffer, qualifierOffset, qualifierLength) == 0){
           return;
         }
@@ -112,7 +113,7 @@
     
     if(deleteBuffer != null) {
       // TODO ryan use a specific comparator
-      int ret = comparator.compareRows(deleteBuffer, deleteOffset, deleteLength,
+      int ret = Bytes.compareTo(deleteBuffer, deleteOffset, deleteLength,
           buffer, qualifierOffset, qualifierLength);
 
       if(ret == 0) {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGetDeleteTracker.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGetDeleteTracker.java?rev=784503&r1=784502&r2=784503&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGetDeleteTracker.java
(original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGetDeleteTracker.java
Sun Jun 14 03:17:19 2009
@@ -68,7 +68,7 @@
   private byte delFam = KeyValue.Type.DeleteFamily.getCode();
 
   protected void setUp() throws Exception {
-    dt = new GetDeleteTracker(KeyValue.KEY_COMPARATOR);
+    dt = new GetDeleteTracker();
     col1 = "col".getBytes();
     col2 = "col2".getBytes();
     col1Len = col1.length;



Mime
View raw message