@Test
  public void testPlayingRecoveredEdit() throws Exception {
    TableName tn = TableName.valueOf(TestRecoveredEdits.RECOVEREDEDITS_TABLENAME);
    TEST_UTIL.createTable(tn, TestRecoveredEdits.RECOVEREDEDITS_COLUMNFAMILY);
    // Copy testing recovered.edits file that is over under hbase-server test resources
    // up into a dir in our little hdfs cluster here.
    String hbaseServerTestResourcesEdits =
      System.getProperty("test.build.classes") + "/../../../hbase-server/src/test/resources/"
        + TestRecoveredEdits.RECOVEREDEDITS_PATH.getName();
    assertTrue(new File(hbaseServerTestResourcesEdits).exists());
    FileSystem dfs = TEST_UTIL.getDFSCluster().getFileSystem();
    // Target dir.
    Path targetDir = new Path("edits").makeQualified(dfs.getUri(), dfs.getHomeDirectory());
    assertTrue(dfs.mkdirs(targetDir));
    dfs.copyFromLocalFile(new Path(hbaseServerTestResourcesEdits), targetDir);
    assertEquals(0,
      ToolRunner.run(new WALPlayer(this.conf), new String[] { targetDir.toString() }));
    // I don't know how many edits are in this file for this table... so just check more than 1.
    assertTrue(TEST_UTIL.countRows(tn) > 0);
  }
Test that WALPlayer can replay recovered.edits files.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java