private void setSubEvents() {
    Set<String> subEvents = new LinkedHashSet<String>();

    // check for pig jobs
    Matcher pigJobMatcher = _mrPigJobIdPattern.matcher(_rawLog);
    while (pigJobMatcher.find()) {
      String pigJobFailedString = pigJobMatcher.group();
      Matcher jobIdMatcher = _mrJobIdPattern.matcher(pigJobFailedString);
      if (jobIdMatcher.find()) {
        subEvents.add(jobIdMatcher.group());
        this._subEvents = subEvents;
        return;
      }
    }

    pigJobMatcher.reset();

    // check for hive jobs
    Matcher hiveJobMatcher = _mrHiveJobIdPattern.matcher(_rawLog);
    while (hiveJobMatcher.find()) {
      String hiveJobFailedString = hiveJobMatcher.group();
      Matcher jobIdMatcher = _mrJobIdPattern.matcher(hiveJobFailedString);
      if (jobIdMatcher.find()) {
        subEvents.add(jobIdMatcher.group());
        this._subEvents = subEvents;
        return;
      }
    }

    // any other job than pig or hive
    Matcher matcher = _mrJobIdPattern.matcher(_rawLog);
    long counter = SAMPLING_SIZE;  // sample the applications
    while (matcher.find() && counter > 0) {
      counter--;
      subEvents.add(matcher.group());
    }
    this._subEvents = subEvents;
  }
Sets _subEvents equal to the list of mr job ids in the given Azkaban job log
app/com/linkedin/drelephant/exceptions/azkaban/AzkabanJobLogAnalyzer.java