@Test
  public void testOldRecoveredEditsFileSidelined() throws IOException {
    Path p = createRecoveredEditsPathForRegion();
    Path tdir = CommonFSUtils.getTableDir(HBASEDIR, TableName.META_TABLE_NAME);
    Path regiondir = new Path(tdir, RegionInfoBuilder.FIRST_META_REGIONINFO.getEncodedName());
    fs.mkdirs(regiondir);
    Path parent = WALSplitUtil.getRegionDirRecoveredEditsDir(regiondir);
    assertEquals(HConstants.RECOVERED_EDITS_DIR, parent.getName());
    fs.createNewFile(parent); // create a recovered.edits file
    String parentOfParent = p.getParent().getParent().getName();
    assertEquals(parentOfParent, RegionInfoBuilder.FIRST_META_REGIONINFO.getEncodedName());
    WALFactory.createRecoveredEditsWriter(fs, p, conf).close();
  }
Test old recovered edits file doesn't break WALSplitter. This is useful in upgrading old
instances.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java