public boolean start() throws IOException {
    if (!compactingMemStore.hasImmutableSegments()) { // no compaction on empty pipeline
      return false;
    }

    // get a snapshot of the list of the segments from the pipeline,
    // this local copy of the list is marked with specific version
    versionedList = compactingMemStore.getImmutableSegments();
    LOG.trace("Speculative compaction starting on {}/{}",
      compactingMemStore.getStore().getHRegion().getRegionInfo().getEncodedName(),
      compactingMemStore.getStore().getColumnFamilyName());
    HStore store = compactingMemStore.getStore();
    RegionCoprocessorHost cpHost = store.getCoprocessorHost();
    if (cpHost != null) {
      cpHost.preMemStoreCompaction(store);
    }
    try {
      doCompaction();
    } finally {
      if (cpHost != null) {
        cpHost.postMemStoreCompaction(store);
      }
    }
    return true;
  }
---------------------------------------------------------------------- The request to dispatch
the compaction asynchronous task. The method returns true if compaction was successfully
dispatched, or false if there is already an ongoing compaction or no segments to compact.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java