@Test
  public void testSplitLogFileFirstLineCorruptionLog() throws IOException {
    conf.setBoolean(WALSplitter.SPLIT_SKIP_ERRORS_KEY, true);
    generateWALs(1, 10, -1);
    FileStatus logfile = fs.listStatus(WALDIR)[0];

    corruptWAL(logfile.getPath(), Corruptions.INSERT_GARBAGE_ON_FIRST_LINE, true);

    useDifferentDFSClient();
    WALSplitter.split(HBASELOGDIR, WALDIR, OLDLOGDIR, fs, conf, wals);

    final Path corruptDir =
      new Path(CommonFSUtils.getWALRootDir(conf), HConstants.CORRUPT_DIR_NAME);
    assertEquals(1, fs.listStatus(corruptDir).length);
  }
Sets up a log splitter with a mock reader and writer. The mock reader generates a specified
number of edits spread across 5 regions. The mock writer optionally sleeps for each edit it is
fed. After the split is complete, verifies that the statistics show the correct number of edits
output into each region.
@param numFakeEdits   number of fake edits to push through pipeline
@param bufferSize     size of in-memory buffer
@param writerSlowness writer threads will sleep this many ms per edit
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java