code: public static String urlInJobHistory(
      Path jobHistoryFileLocation, String jobId)
      throws IOException {
      try {
        FileSystem fs = jobHistoryFileLocation.getFileSystem(conf);
        fs.getFileStatus(jobHistoryFileLocation);
      }  catch (FileNotFoundException e) {
        return null;
      }
      return "http://" + LOCALMACHINE + ":" + LOCALPORT +
        "/coronajobdetailshistory.jsp?jobid=" + jobId +
        "&logFile=" + URLEncoder.encode(jobHistoryFileLocation.toString());
    }
docs: Given the path to the jobHistoryFile, check if the file already exists.
  1. If FileNoFoundException is caught, means the job is not yet finished,
  and there is not job hisotry log file in the done directory
  2. If not, it means we get a hit for the jobHistoryFile, directly recover
  the url to the coronoajobdetailshistory page.
  @param jobId
  @return url if the job is done and the jobHistory is in the jobHistory
  folder, null if the job cannot be found in the jobHistory folder.
  @throws IOException