code: public static JobHistoryFileParser createJobHistoryFileParser(
        byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException {
  
      if (historyFileContents == null) {
        throw new IllegalArgumentException(
            "Job history contents should not be null");
      }
  
      HadoopVersion version = getVersion(historyFileContents);
  
      switch (version) {
      case TWO:
        return new JobHistoryFileParserHadoop2(jobConf);
  
      default:
        throw new IllegalArgumentException(
            " Unknown format of job history file ");
      }
    }
docs: creates an instance of
  {@link JobHistoryFileParserHadoop2} that can parse post MAPREDUCE-1016 job history files
  
  @param historyFileContents: history file contents
  
  @return an object that can parse job history files
  Or return null if either input is null