code: private static void cleanUpWorkingDirectory(Path mrJobDir, FileSystem fs) throws IOException {
      if (fs.exists(mrJobDir)) {
        fs.delete(mrJobDir, true);
        LOG.info("Deleted working directory " + mrJobDir);
      }
    }
docs: Cleanup the Hadoop MR working directory.