@Override
        public Integer run() throws Exception {
          StringBuilder ls =
            new StringBuilder("Contents of WALDIR (").append(WALDIR).append("):\n");
          for (FileStatus status : fs.listStatus(WALDIR)) {
            ls.append("\t").append(status.toString()).append("\n");
          }
          LOG.debug(Objects.toString(ls));
          LOG.info("Splitting WALs out from under zombie. Expecting " + numWriters + " files.");
          WALSplitter.split(HBASELOGDIR, WALDIR, OLDLOGDIR, fs, conf2, wals);
          LOG.info("Finished splitting out from under zombie.");
          Path[] logfiles = getLogForRegion(TABLE_NAME, region);
          assertEquals("wrong number of split files for region", numWriters, logfiles.length);
          int count = 0;
          for (Path logfile : logfiles) {
            count += countWAL(logfile);
          }
          return count;
        }
Simulates splitting a WAL out from under a regionserver that is still trying to write it.
Ensures we do not lose edits.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java