hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [35/50] [abbrv] hbase git commit: HBASE-15496 Throw RowTooBigException only for user scan/get (Guanghao Zhang)
Date Wed, 30 Mar 2016 16:03:37 GMT
HBASE-15496 Throw RowTooBigException only for user scan/get (Guanghao Zhang)


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

Branch: refs/heads/hbase-12439
Commit: b865fb9434f3fc700cced9d6cdc5235794f8b5ba
Parents: 11d11d3
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Mar 25 18:18:35 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Mar 25 18:18:35 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java   | 4 ++++
 .../java/org/apache/hadoop/hbase/regionserver/StoreScanner.java  | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b865fb94/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
index 706fc5b..bfd399b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
@@ -610,6 +610,10 @@ public class ScanQueryMatcher {
     }
   }
 
+  boolean isUserScan() {
+    return this.isUserScan;
+  }
+
   //Used only for testing purposes
   static MatchCode checkColumn(ColumnTracker columnTracker, byte[] bytes, int offset,
       int length, long ttl, byte type, boolean ignoreCount) throws IOException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b865fb94/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
index 8dd3d7d..ecae787 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
@@ -351,7 +351,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
       if (!isParallelSeek) {
         long totalScannersSoughtBytes = 0;
         for (KeyValueScanner scanner : scanners) {
-          if (totalScannersSoughtBytes >= maxRowSize) {
+          if (matcher.isUserScan() && totalScannersSoughtBytes >= maxRowSize)
{
             throw new RowTooBigException("Max row size allowed: " + maxRowSize
               + ", but row is bigger than that");
           }
@@ -572,7 +572,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
           scannerContext.incrementSizeProgress(CellUtil.estimatedHeapSizeOf(cell));
           scannerContext.incrementBatchProgress(1);
 
-          if (totalBytesRead > maxRowSize) {
+          if (matcher.isUserScan() && totalBytesRead > maxRowSize) {
             throw new RowTooBigException(
                 "Max row size allowed: " + maxRowSize + ", but the row is bigger than that.");
           }


Mime
View raw message