HBASE-15496 Throw RowTooBigException only for user scan/get (Guanghao Zhang)
This commit is contained in:
parent
11d11d3fcc
commit
b865fb9434
@ -610,6 +610,10 @@ public class ScanQueryMatcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isUserScan() {
|
||||||
|
return this.isUserScan;
|
||||||
|
}
|
||||||
|
|
||||||
//Used only for testing purposes
|
//Used only for testing purposes
|
||||||
static MatchCode checkColumn(ColumnTracker columnTracker, byte[] bytes, int offset,
|
static MatchCode checkColumn(ColumnTracker columnTracker, byte[] bytes, int offset,
|
||||||
int length, long ttl, byte type, boolean ignoreCount) throws IOException {
|
int length, long ttl, byte type, boolean ignoreCount) throws IOException {
|
||||||
|
@ -351,7 +351,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
|
|||||||
if (!isParallelSeek) {
|
if (!isParallelSeek) {
|
||||||
long totalScannersSoughtBytes = 0;
|
long totalScannersSoughtBytes = 0;
|
||||||
for (KeyValueScanner scanner : scanners) {
|
for (KeyValueScanner scanner : scanners) {
|
||||||
if (totalScannersSoughtBytes >= maxRowSize) {
|
if (matcher.isUserScan() && totalScannersSoughtBytes >= maxRowSize) {
|
||||||
throw new RowTooBigException("Max row size allowed: " + maxRowSize
|
throw new RowTooBigException("Max row size allowed: " + maxRowSize
|
||||||
+ ", but row is bigger than that");
|
+ ", but row is bigger than that");
|
||||||
}
|
}
|
||||||
@ -572,7 +572,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
|
|||||||
scannerContext.incrementSizeProgress(CellUtil.estimatedHeapSizeOf(cell));
|
scannerContext.incrementSizeProgress(CellUtil.estimatedHeapSizeOf(cell));
|
||||||
scannerContext.incrementBatchProgress(1);
|
scannerContext.incrementBatchProgress(1);
|
||||||
|
|
||||||
if (totalBytesRead > maxRowSize) {
|
if (matcher.isUserScan() && totalBytesRead > maxRowSize) {
|
||||||
throw new RowTooBigException(
|
throw new RowTooBigException(
|
||||||
"Max row size allowed: " + maxRowSize + ", but the row is bigger than that.");
|
"Max row size allowed: " + maxRowSize + ", but the row is bigger than that.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user