public void replaceStoreFiles(Collection<HStoreFile> compactedFiles,
    Collection<HStoreFile> newFiles, IOExceptionRunnable walMarkerWriter, Runnable actionUnderLock)
    throws IOException {
    storeFileTracker.replace(StoreUtils.toStoreFileInfo(compactedFiles),
      StoreUtils.toStoreFileInfo(newFiles));
    walMarkerWriter.run();
    writeLock();
    try {
      storeFileManager.addCompactionResults(compactedFiles, newFiles);
      actionUnderLock.run();
    } finally {
      writeUnlock();
    }
  }
Add the store files to store file manager, and also record it in the store file tracker.
<p/>
The {@code actionAfterAdding} will be executed after the insertion to store file manager, under
the lock protection. Usually this is for clear the memstore snapshot.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreEngine.java