From bf52cfcc3d0ac01334b31d935821c2cd0db4142b Mon Sep 17 00:00:00 2001 From: gsheffi Date: Sun, 4 Feb 2018 15:26:41 +0200 Subject: [PATCH] for creating patch HBASE-19930-V01.patch --- .../hadoop/hbase/regionserver/ImmutableMemStoreLAB.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableMemStoreLAB.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableMemStoreLAB.java index 93d2685e37..1c1b327642 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableMemStoreLAB.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableMemStoreLAB.java @@ -45,9 +45,19 @@ public class ImmutableMemStoreLAB implements MemStoreLAB { throw new IllegalStateException("This is an Immutable MemStoreLAB."); } + /** + * Allocates a slice and copies the passed Cell into this area. + * Returns a new Cell instance over the copied data. + * When MSLABImpl can not copy this Cell, it returns null. + * Since the process of flattening to CellChunkMap assumes all cells are allocated on MSLAB, + * and since copyCellInto does not copy big cells (for whom size > maxAlloc) into MSLAB, + * this method is called while the process of flattening to CellChunkMap is running, + * for forcing the allocation of big cells on this MSLAB. + */ @Override public Cell forceCopyOfBigCellInto(Cell cell) { - throw new IllegalStateException("This is an Immutable MemStoreLAB."); + MemStoreLAB mslab = this.mslabs.get(0); + return mslab.forceCopyOfBigCellInto(cell); } /* Creating chunk to be used as index chunk in CellChunkMap, part of the chunks array. -- 2.12.2