private Set<String> splitCorruptWALs(final FaultyProtobufWALStreamReader.FailureType failureType)
    throws IOException {
    String backupClass = conf.get(WALFactory.WAL_STREAM_READER_CLASS_IMPL);
    InstrumentedLogWriter.activateFailure = false;

    try {
      conf.setClass(WALFactory.WAL_STREAM_READER_CLASS_IMPL, FaultyProtobufWALStreamReader.class,
        WALStreamReader.class);
      conf.set("faultyprotobuflogreader.failuretype", failureType.name());
      // Clean up from previous tests or previous loop
      try {
        wals.shutdown();
      } catch (IOException exception) {
        // since we're splitting out from under the factory, we should expect some closing failures.
        LOG.debug("Ignoring problem closing WALFactory.", exception);
      }
      wals.close();
      try {
        for (FileStatus log : fs.listStatus(CORRUPTDIR)) {
          fs.delete(log.getPath(), true);
        }
      } catch (FileNotFoundException exception) {
        LOG.debug("no previous CORRUPTDIR to clean.");
      }
      // change to the faulty reader
      wals = new WALFactory(conf, name.getMethodName());
      generateWALs(-1);
      // Our reader will render all of these files corrupt.
      final Set<String> walDirContents = new HashSet<>();
      for (FileStatus status : fs.listStatus(WALDIR)) {
        walDirContents.add(status.getPath().getName());
      }
      useDifferentDFSClient();
      WALSplitter.split(HBASELOGDIR, WALDIR, OLDLOGDIR, fs, conf, wals);
      return walDirContents;
    } finally {
      if (backupClass != null) {
        conf.set(WALFactory.WAL_STREAM_READER_CLASS_IMPL, backupClass);
      } else {
        conf.unset(WALFactory.WAL_STREAM_READER_CLASS_IMPL);
      }
    }
  }
@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