private Path[] getLogForRegion(TableName table, String region) throws IOException {
    Path tdir = CommonFSUtils.getWALTableDir(conf, table);
    @SuppressWarnings("deprecation")
    Path editsdir = WALSplitUtil.getRegionDirRecoveredEditsDir(
      HRegion.getRegionDir(tdir, Bytes.toString(Bytes.toBytes(region))));
    FileStatus[] files = fs.listStatus(editsdir, new PathFilter() {
      @Override
      public boolean accept(Path p) {
        if (WALSplitUtil.isSequenceIdFile(p)) {
          return false;
        }
        return true;
      }
    });
    Path[] paths = new Path[files.length];
    for (int i = 0; i < files.length; i++) {
      paths[i] = files[i].getPath();
    }
    return paths;
  }
@param leaveOpen index to leave un-closed. -1 to close all.
@return the writer that's still open, or null if all were closed.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java