private void deleteFile() {
    while (true) {
      try {
        final CleanerContext context = pendingDelete.take();
        Preconditions.checkNotNull(context);
        FileStatus oldWalFile = context.getTargetToClean();
        try {
          LOG.debug("Deleting {}", oldWalFile);
          boolean succeed = this.fs.delete(oldWalFile.getPath(), false);
          context.setResult(succeed);
        } catch (IOException e) {
          // fs.delete() fails.
          LOG.warn("Failed to delete old WAL file", e);
          context.setResult(false);
        }
      } catch (InterruptedException ite) {
        // It is most likely from configuration changing request
        LOG.warn(
          "Interrupted while cleaning old WALs, will " + "try to clean it next round. Exiting.");
        // Restore interrupt status
        Thread.currentThread().interrupt();
        return;
      }
      LOG.trace("Exiting");
    }
  }
@param period    the period of time to sleep between each run
@param stopper   the stopper
@param conf      configuration to use
@param fs        handle to the FS
@param oldLogDir the path to the archived logs
@param pool      the thread pool used to scan directories
hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/LogCleaner.java