protected void finalizeWriter(StoreFileWriter writer, long cacheFlushSeqNum, MonitoredTask status)
    throws IOException {
    // Write out the log sequence number that corresponds to this output
    // hfile. Also write current time in metadata as minFlushTime.
    // The hfile is current up to and including cacheFlushSeqNum.
    status.setStatus("Flushing " + store + ": appending metadata");
    writer.appendMetadata(cacheFlushSeqNum, false);
    status.setStatus("Flushing " + store + ": closing flushed file");
    writer.close();
  }
Turns a snapshot of memstore into a set of store files.
@param snapshot             Memstore snapshot.
@param cacheFlushSeqNum     Log cache flush sequence number.
@param status               Task that represents the flush operation and may be updated with
                            status.
@param throughputController A controller to avoid flush too fast
@return List of files written. Can be empty; must not be null.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java