static Status splitLog(String filename, CancelableProgressable p, Configuration conf,
    RegionServerServices server, LastSequenceId sequenceIdChecker, WALFactory factory) {
    Path walDir;
    FileSystem fs;
    try {
      walDir = CommonFSUtils.getWALRootDir(conf);
      fs = walDir.getFileSystem(conf);
    } catch (IOException e) {
      LOG.warn("Resigning, could not find root dir or fs", e);
      return Status.RESIGNED;
    }
    try {
      if (!processSyncReplicationWAL(filename, conf, server, fs, walDir)) {
        return Status.DONE;
      }
    } catch (IOException e) {
      LOG.warn("failed to process sync replication wal {}", filename, e);
      return Status.RESIGNED;
    }
    // TODO have to correctly figure out when log splitting has been
    // interrupted or has encountered a transient error and when it has
    // encountered a bad non-retry-able persistent error.
    try {
      SplitLogWorkerCoordination splitLogWorkerCoordination =
        server.getCoordinatedStateManager() == null
          ? null
          : server.getCoordinatedStateManager().getSplitLogWorkerCoordination();
      if (
        !WALSplitter.splitLogFile(walDir, fs.getFileStatus(new Path(walDir, filename)), fs, conf, p,
          sequenceIdChecker, splitLogWorkerCoordination, factory, server)
      ) {
        return Status.PREEMPTED;
      }
    } catch (InterruptedIOException iioe) {
      LOG.warn("Resigning, interrupted splitting WAL {}", filename, iioe);
      return Status.RESIGNED;
    } catch (IOException e) {
      if (e instanceof FileNotFoundException) {
        // A wal file may not exist anymore. Nothing can be recovered so move on
        LOG.warn("Done, WAL {} does not exist anymore", filename, e);
        return Status.DONE;
      }
      Throwable cause = e.getCause();
      if (
        e instanceof RetriesExhaustedException && (cause instanceof NotServingRegionException
          || cause instanceof ConnectException || cause instanceof SocketTimeoutException)
      ) {
        LOG.warn("Resigning, can't connect to target regionserver splitting WAL {}", filename, e);
        return Status.RESIGNED;
      } else if (cause instanceof InterruptedException) {
        LOG.warn("Resigning, interrupted splitting WAL {}", filename, e);
        return Status.RESIGNED;
      }
      LOG.warn("Error splitting WAL {}", filename, e);
      return Status.ERR;
    }
    LOG.debug("Done splitting WAL {}", filename);
    return Status.DONE;
  }
Returns Result either DONE, RESIGNED, or ERR.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java