void initiateCompactionStrategy(MemoryCompactionPolicy compType, Configuration configuration,
    String cfName) throws IllegalArgumentIOException {

    assert (compType != MemoryCompactionPolicy.NONE);

    switch (compType) {
      case BASIC:
        strategy = new BasicMemStoreCompactionStrategy(configuration, cfName);
        break;
      case EAGER:
        strategy = new EagerMemStoreCompactionStrategy(configuration, cfName);
        break;
      case ADAPTIVE:
        strategy = new AdaptiveMemStoreCompactionStrategy(configuration, cfName);
        break;
      default:
        // sanity check
        throw new IllegalArgumentIOException("Unknown memory compaction type " + compType);
    }
  }
---------------------------------------------------------------------- Creation of the
ImmutableSegment either by merge or copy-compact of the segments of the pipeline, based on the
Compactor Iterator. The new ImmutableSegment is returned.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java