@Override
  public List<Path> close() throws IOException {
    boolean isSuccessful;
    try {
      isSuccessful = finishWriterThreads();
    } catch (IOException e) {
      closeWriters(false);
      throw e;
    }
    if (!isSuccessful) {
      // Even if an exception is not thrown, finishWriterThreads() not being successful is an
      // error case where the WAL files should not be finalized.
      closeWriters(false);
      return null;
    }
    isSuccessful = closeWriters(true);
    return isSuccessful ? splits : null;
  }
Get a writer and path for a log starting at the given entry. This function is threadsafe so
long as multiple threads are always acting on different regions.
@return null if this region shouldn't output any logs
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/RecoveredEditsOutputSink.java