@Override
  public void close() throws IOException {
    Exception error = null;
    for (T writer : writers) {
      try {
        writer.close();
      } catch (Exception e) {
        LOG.warn("close writer failed", e);
        if (error == null) {
          error = e;
        }
      }
    }
    if (error != null) {
      throw new IOException("Failed to close at least one writer, please see the warn log above. "
        + "The cause is the first exception occurred", error);
    }
  }
Base class for combined wal writer implementations.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/CombinedWriterBase.java