hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-15496 Throw RowTooBigException only for user scan/get (Guanghao Zhang)
Date Sat, 26 Mar 2016 02:05:22 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 d5bc56c26 -> 87f1af842


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/87f1af84
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/87f1af84
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/87f1af84

Branch: refs/heads/branch-1
Commit: 87f1af842ab1a5e8242b446e45f5b7e14604a349
Parents: d5bc56c
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Mar 25 19:05:15 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Mar 25 19:05:15 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/87f1af84/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 c832255..2ee9ee1 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
@@ -622,6 +622,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/87f1af84/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 ddf0721..bfa8335 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
@@ -347,7 +347,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");
           }
@@ -557,7 +557,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
             scannerContext.incrementSizeProgress(CellUtil.estimatedHeapSizeOfWithoutTags(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