hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1297343 - in /hbase/trunk/src: main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
Date Tue, 06 Mar 2012 06:17:11 GMT
Author: larsh
Date: Tue Mar  6 06:17:11 2012
New Revision: 1297343

URL: http://svn.apache.org/viewvc?rev=1297343&view=rev
Log:
HBASE-5523 Fix Delete Timerange logic for KEEP_DELETED_CELLS

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java?rev=1297343&r1=1297342&r2=1297343&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java Tue
Mar  6 06:17:11 2012
@@ -281,8 +281,7 @@ public class ScanQueryMatcher {
         // first ignore delete markers if the scanner can do so, and the
         // range does not include the marker
         boolean includeDeleteMarker = seePastDeleteMarkers ?
-            // +1, to allow a range between a delete and put of same TS
-            tr.withinTimeRange(timestamp+1) :
+            tr.withinTimeRange(timestamp) :
             tr.withinOrAfterTimeRange(timestamp);
         if (includeDeleteMarker) {
           this.deletes.add(bytes, offset, qualLength, timestamp, type);

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java?rev=1297343&r1=1297342&r2=1297343&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java Tue Mar
 6 06:17:11 2012
@@ -178,7 +178,7 @@ public class TestFromClientSide {
      p.add(FAMILY, C0, T3);
      h.put(p);
 
-     Delete d = new Delete(T1, ts+2, null);
+     Delete d = new Delete(T1, ts+3, null);
      h.delete(d);
 
      d = new Delete(T1, ts+3, null);

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java?rev=1297343&r1=1297342&r2=1297343&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java Tue
Mar  6 06:17:11 2012
@@ -447,16 +447,16 @@ public class TestKeepDeletes extends HBa
     p.add(c1, c1, T2);
     region.put(p);
 
-    Delete d = new Delete(T1, ts+1, null);
-    d.deleteColumns(c0, c0, ts+1);
+    Delete d = new Delete(T1, ts+2, null);
+    d.deleteColumns(c0, c0, ts+2);
     region.delete(d, null, true);
 
-    d = new Delete(T1, ts+1, null);
-    d.deleteFamily(c1, ts+1);
+    d = new Delete(T1, ts+2, null);
+    d.deleteFamily(c1, ts+2);
     region.delete(d, null, true);
 
-    d = new Delete(T2, ts+1, null);
-    d.deleteFamily(c0, ts+1);
+    d = new Delete(T2, ts+2, null);
+    d.deleteFamily(c0, ts+2);
     region.delete(d, null, true);
 
     // add an older delete, to make sure it is filtered
@@ -464,7 +464,7 @@ public class TestKeepDeletes extends HBa
     d.deleteFamily(c1, ts-10);
     region.delete(d, null, true);
 
-    // ts + 2 does NOT include the delete at ts+1
+    // ts + 2 does NOT include the delete at ts+2
     checkGet(region, T1, c0, c0, ts+2, T2, T1);
     checkGet(region, T1, c0, c1, ts+2, T2, T1);
     checkGet(region, T1, c1, c0, ts+2, T2, T1);
@@ -610,10 +610,10 @@ public class TestKeepDeletes extends HBa
     region.put(p);
 
     // family markers are each family
-    Delete d = new Delete(T1, ts, null);
+    Delete d = new Delete(T1, ts+1, null);
     region.delete(d, null, true);
 
-    d = new Delete(T2, ts+1, null);
+    d = new Delete(T2, ts+2, null);
     region.delete(d, null, true);
 
     Scan s = new Scan(T1);



Mime
View raw message