HBASE-15496 Throw RowTooBigException only for user scan/get (Guanghao Zhang)

This commit is contained in:
tedyu 2016-03-25 19:05:15 -07:00
parent d5bc56c266
commit 87f1af842a
2 changed files with 6 additions and 2 deletions

View File

@ -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 {

View File

@ -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.");
}