hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject [1/2] hbase git commit: Revert "HBASE-16840 Reuse cell's timestamp and type in ScanQueryMatcher" to update author
Date Mon, 07 Nov 2016 14:50:13 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 4d8611fa0 -> c4132bbf3


Revert "HBASE-16840 Reuse cell's timestamp and type in ScanQueryMatcher" to update author

This reverts commit 4d8611fa0ff475e21546fc10252ea740e4e6683a.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a6748120
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a6748120
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a6748120

Branch: refs/heads/branch-1
Commit: a67481209f5d315f06e3a6910fa44493e398210f
Parents: 4d8611f
Author: Yu Li <liyu@apache.org>
Authored: Mon Nov 7 22:26:37 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Mon Nov 7 22:42:38 2016 +0800

----------------------------------------------------------------------
 .../hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java | 2 +-
 .../querymatcher/MajorCompactionScanQueryMatcher.java           | 5 ++---
 .../querymatcher/MinorCompactionScanQueryMatcher.java           | 5 ++---
 .../regionserver/querymatcher/NormalUserScanQueryMatcher.java   | 5 ++---
 .../hbase/regionserver/querymatcher/RawScanQueryMatcher.java    | 4 +---
 .../querymatcher/StripeCompactionScanQueryMatcher.java          | 5 ++---
 .../hbase/regionserver/querymatcher/UserScanQueryMatcher.java   | 5 +++--
 7 files changed, 13 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java
index 6827c62..46c29c5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java
@@ -173,7 +173,7 @@ public class LegacyScanQueryMatcher extends ScanQueryMatcher {
     long mvccVersion = cell.getSequenceId();
     int qualifierOffset = cell.getQualifierOffset();
     int qualifierLength = cell.getQualifierLength();
-    if (CellUtil.isDelete(typeByte)) {
+    if (CellUtil.isDelete(cell)) {
       if (keepDeletedCells == KeepDeletedCells.FALSE
           || (keepDeletedCells == KeepDeletedCells.TTL && timestamp < oldestUnexpiredTS))
{
         // first ignore delete markers if the scanner can do so, and the

http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MajorCompactionScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MajorCompactionScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MajorCompactionScanQueryMatcher.java
index 9830fae..e3bc924 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MajorCompactionScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MajorCompactionScanQueryMatcher.java
@@ -43,7 +43,6 @@ public class MajorCompactionScanQueryMatcher extends DropDeletesCompactionScanQu
     }
     long timestamp = cell.getTimestamp();
     long mvccVersion = cell.getSequenceId();
-    byte typeByte = cell.getTypeByte();
 
     // The delete logic is pretty complicated now.
     // This is corroborated by the following:
@@ -57,7 +56,7 @@ public class MajorCompactionScanQueryMatcher extends DropDeletesCompactionScanQu
     // 7. Delete marker need to be version counted together with puts
     // they affect
     //
-    if (CellUtil.isDelete(typeByte)) {
+    if (CellUtil.isDelete(cell)) {
       if (mvccVersion > maxReadPointToTrackVersions) {
         // We can not drop this delete marker yet, and also we should not use this delete
marker to
         // mask any cell yet.
@@ -76,7 +75,7 @@ public class MajorCompactionScanQueryMatcher extends DropDeletesCompactionScanQu
     }
     // Skip checking column since we do not remove column during compaction.
     return columns.checkVersions(cell.getQualifierArray(), cell.getQualifierOffset(),
-      cell.getQualifierLength(), timestamp, typeByte,
+      cell.getQualifierLength(), timestamp, cell.getTypeByte(),
       mvccVersion > maxReadPointToTrackVersions);
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MinorCompactionScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MinorCompactionScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MinorCompactionScanQueryMatcher.java
index 385fc18..4ba3293 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MinorCompactionScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MinorCompactionScanQueryMatcher.java
@@ -42,8 +42,7 @@ public class MinorCompactionScanQueryMatcher extends CompactionScanQueryMatcher
       return returnCode;
     }
     long mvccVersion = cell.getSequenceId();
-    byte typeByte = cell.getTypeByte();
-    if (CellUtil.isDelete(typeByte)) {
+    if (CellUtil.isDelete(cell)) {
       if (mvccVersion > maxReadPointToTrackVersions) {
         // we should not use this delete marker to mask any cell yet.
         return MatchCode.INCLUDE;
@@ -57,7 +56,7 @@ public class MinorCompactionScanQueryMatcher extends CompactionScanQueryMatcher
     }
     // Skip checking column since we do not remove column during compaction.
     return columns.checkVersions(cell.getQualifierArray(), cell.getQualifierOffset(),
-      cell.getQualifierLength(), cell.getTimestamp(), typeByte,
+      cell.getQualifierLength(), cell.getTimestamp(), cell.getTypeByte(),
       mvccVersion > maxReadPointToTrackVersions);
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
index 894bbec..3942f04 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
@@ -60,8 +60,7 @@ public class NormalUserScanQueryMatcher extends UserScanQueryMatcher {
       return returnCode;
     }
     long timestamp = cell.getTimestamp();
-    byte typeByte = cell.getTypeByte();
-    if (CellUtil.isDelete(typeByte)) {
+    if (CellUtil.isDelete(cell)) {
       boolean includeDeleteMarker = seePastDeleteMarkers ? tr.withinTimeRange(timestamp)
           : tr.withinOrAfterTimeRange(timestamp);
       if (includeDeleteMarker) {
@@ -73,7 +72,7 @@ public class NormalUserScanQueryMatcher extends UserScanQueryMatcher {
     if (returnCode != null) {
       return returnCode;
     }
-    return matchColumn(cell, timestamp, typeByte);
+    return matchColumn(cell);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/RawScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/RawScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/RawScanQueryMatcher.java
index 84484ed..acdae90 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/RawScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/RawScanQueryMatcher.java
@@ -44,11 +44,9 @@ public class RawScanQueryMatcher extends UserScanQueryMatcher {
     if (returnCode != null) {
       return returnCode;
     }
-    long timestamp = cell.getTimestamp();
-    byte typeByte = cell.getTypeByte();
     // For a raw scan, we do not filter out any cells by delete marker, and delete marker
is also
     // returned, so we do not need to track delete.
-    return matchColumn(cell, timestamp, typeByte);
+    return matchColumn(cell);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/StripeCompactionScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/StripeCompactionScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/StripeCompactionScanQueryMatcher.java
index 9ae3975..9abc153 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/StripeCompactionScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/StripeCompactionScanQueryMatcher.java
@@ -55,8 +55,7 @@ public class StripeCompactionScanQueryMatcher extends DropDeletesCompactionScanQ
       return returnCode;
     }
     long mvccVersion = cell.getSequenceId();
-    byte typeByte = cell.getTypeByte();
-    if (CellUtil.isDelete(typeByte)) {
+    if (CellUtil.isDelete(cell)) {
       if (mvccVersion > maxReadPointToTrackVersions) {
         return MatchCode.INCLUDE;
       }
@@ -79,7 +78,7 @@ public class StripeCompactionScanQueryMatcher extends DropDeletesCompactionScanQ
     }
     // Skip checking column since we do not remove column during compaction.
     return columns.checkVersions(cell.getQualifierArray(), cell.getQualifierOffset(),
-      cell.getQualifierLength(), cell.getTimestamp(), typeByte,
+      cell.getQualifierLength(), cell.getTimestamp(), cell.getTypeByte(),
       mvccVersion > maxReadPointToTrackVersions);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/a6748120/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/UserScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/UserScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/UserScanQueryMatcher.java
index b600d94..b1e20c9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/UserScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/UserScanQueryMatcher.java
@@ -88,8 +88,8 @@ public abstract class UserScanQueryMatcher extends ScanQueryMatcher {
     }
   }
 
-  protected final MatchCode matchColumn(Cell cell, long timestamp, byte typeByte)
-      throws IOException {
+  protected final MatchCode matchColumn(Cell cell) throws IOException {
+    long timestamp = cell.getTimestamp();
     int tsCmp = tr.compare(timestamp);
     if (tsCmp > 0) {
       return MatchCode.SKIP;
@@ -100,6 +100,7 @@ public abstract class UserScanQueryMatcher extends ScanQueryMatcher {
       return columns.getNextRowOrNextColumn(cell.getQualifierArray(), qualifierOffset,
         qualifierLength);
     }
+    byte typeByte = cell.getTypeByte();
     // STEP 1: Check if the column is part of the requested columns
     MatchCode colChecker = columns.checkColumn(cell.getQualifierArray(), qualifierOffset,
       qualifierLength, typeByte);


Mime
View raw message