public static void closeRegionAndWAL(final HRegion r) throws IOException {
    if (r == null) return;
    r.close();
    if (r.getWAL() == null) return;
    r.getWAL().close();
  }
Close both the HRegion {@code r} and it's underlying WAL. For use in tests.
hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java