public ImmutableSegment createImmutableSegmentByFlattening(CSLMImmutableSegment segment,
    CompactingMemStore.IndexType idxType, MemStoreSizing memstoreSizing,
    MemStoreCompactionStrategy.Action action) {
    ImmutableSegment res = null;
    switch (idxType) {
      case CHUNK_MAP:
        res = new CellChunkImmutableSegment(segment, memstoreSizing, action);
        break;
      case CSLM_MAP:
        assert false; // non-flat segment can not be the result of flattening
        break;
      case ARRAY_MAP:
        res = new CellArrayImmutableSegment(segment, memstoreSizing, action);
        break;
    }
    return res;
  }
create empty immutable segment for initializations This ImmutableSegment is used as a place
holder for snapshot in Memstore. It won't flush later, So it is not necessary to record the
initial size for it.
@param comparator comparator
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SegmentFactory.java