@Override
    protected void preCommitWritersInternal() throws IOException {
      stopUsingCurrentWriter();
      while (existingWriters.size() < boundaries.size() - 1) {
        createEmptyWriter();
      }
      if (lastCell != null) {
        sanityCheckRight(boundaries.get(boundaries.size() - 1), lastCell);
      }
    }
@param targetBoundaries The boundaries on which writers/files are separated.
@param majorRangeFrom   Major range is the range for which at least one file should be
                        written (because all files are included in compaction).
                        majorRangeFrom is the left boundary.
@param majorRangeTo     The right boundary of majorRange (see majorRangeFrom).
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeMultiFileWriter.java