protected List<Path> flushCache(final long logCacheFlushId, MemStoreSnapshot snapshot,
    MonitoredTask status, ThroughputController throughputController, FlushLifeCycleTracker tracker,
    Consumer<Path> writerCreationTracker) throws IOException {
    // If an exception happens flushing, we let it out without clearing
    // the memstore snapshot. The old snapshot will be returned when we say
    // 'snapshot', the next time flush comes around.
    // Retry after catching exception when flushing, otherwise server will abort
    // itself
    StoreFlusher flusher = storeEngine.getStoreFlusher();
    IOException lastException = null;
    for (int i = 0; i < flushRetriesNumber; i++) {
      try {
        List<Path> pathNames = flusher.flushSnapshot(snapshot, logCacheFlushId, status,
          throughputController, tracker, writerCreationTracker);
        Path lastPathName = null;
        try {
          for (Path pathName : pathNames) {
            lastPathName = pathName;
            storeEngine.validateStoreFile(pathName, false);
          }
          return pathNames;
        } catch (Exception e) {
          LOG.warn("Failed validating store file {}, retrying num={}", lastPathName, i, e);
          if (e instanceof IOException) {
            lastException = (IOException) e;
          } else {
            lastException = new IOException(e);
          }
        }
      } catch (IOException e) {
        LOG.warn("Failed flushing store file for {}, retrying num={}", this, i, e);
        lastException = e;
      }
      if (lastException != null && i < (flushRetriesNumber - 1)) {
        try {
          Thread.sleep(pauseTime);
        } catch (InterruptedException e) {
          IOException iie = new InterruptedIOException();
          iie.initCause(e);
          throw iie;
        }
      }
    }
    throw lastException;
  }
Write out current snapshot. Presumes {@code StoreFlusherImpl.prepare()} has been called
previously.
@param logCacheFlushId flush sequence number
@return The path name of the tmp file to which the store was flushed
@throws IOException if exception occurs during process
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java