From 5038fc76c950029c78681dff816d7465f6acbb91 Mon Sep 17 00:00:00 2001 From: Jonathan Lawlor Date: Thu, 26 Mar 2015 15:54:38 -0700 Subject: [PATCH] Amend HBASE-13303 Fix size calculation of results on the region server Signed-off-by: Andrew Purtell --- .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java | 2 +- .../java/org/apache/hadoop/hbase/regionserver/StoreScanner.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index e390d6b2b81..bd25a8241c4 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -5663,7 +5663,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { // long size = 0; for (Cell c : results) { - size += CellUtil.estimatedHeapSizeOf(c); + size += CellUtil.estimatedHeapSizeOfWithoutTags(c); } return size; 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 7ce4e0b91cd..298d5bccca8 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 @@ -544,7 +544,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner outResult.add(cell); count++; totalBytesRead += CellUtil.estimatedSerializedSizeOf(cell); - totalHeapSize += CellUtil.estimatedHeapSizeOf(cell); + totalHeapSize += CellUtil.estimatedHeapSizeOfWithoutTags(cell); if (totalBytesRead > maxRowSize) { throw new RowTooBigException("Max row size allowed: " + maxRowSize + ", but the row is bigger than that.");