private void ignoreCorruption(final Corruptions corruption, final int entryCount,
    final int expectedCount) throws IOException {
    conf.setBoolean(WALSplitter.SPLIT_SKIP_ERRORS_KEY, false);

    final String REGION = "region__1";
    REGIONS.clear();
    REGIONS.add(REGION);

    Path c1 = new Path(WALDIR, WAL_FILE_PREFIX + "0");
    generateWALs(1, entryCount, -1, 0);
    corruptWAL(c1, corruption, true);

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

    Path[] splitLog = getLogForRegion(TABLE_NAME, REGION);
    assertEquals(1, splitLog.length);

    int actualCount = 0;
    try (WALStreamReader in = wals.createStreamReader(fs, splitLog[0])) {
      while (in.next() != null) {
        ++actualCount;
      }
    }
    assertEquals(expectedCount, actualCount);

    // should not have stored the EOF files as corrupt
    FileStatus[] archivedLogs =
      fs.exists(CORRUPTDIR) ? fs.listStatus(CORRUPTDIR) : new FileStatus[0];
    assertEquals(0, archivedLogs.length);

  }
@return set of wal names present prior to split attempt.
@throws IOException if the split process fails
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java