private Chunk[] allocIndexChunks(int numOfCells) {
    // Decide whether to use regular or small chunks and then
    // calculate how many chunks we will need for index

    ChunkCreator.ChunkType chunkType = useIndexChunks(numOfCells);
    int chunkSize = ChunkCreator.getInstance().getChunkSize(chunkType);
    int numberOfChunks = calculateNumberOfChunks(numOfCells, chunkSize);
    // all index Chunks are allocated from ChunkCreator
    Chunk[] chunks = new Chunk[numberOfChunks];
    // all index Chunks are allocated from ChunkCreator
    for (int i = 0; i < numberOfChunks; i++) {
      chunks[i] = this.getMemStoreLAB().getNewExternalChunk(chunkType);
    }
    return chunks;
  }
------------------------------------------------------------------------ C-tor to be used when
new CellChunkImmutableSegment is built as a result of flattening of CSLMImmutableSegment The
given iterator returns the Cells that "survived" the compaction.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CellChunkImmutableSegment.java