tez-plugins/tez-yarn-timeline-history-with-fs/src/main/java/org/apache/tez/dag/history/logging/ats/ATSV15HistoryLoggingService.java [414:455]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private String getDomainForEvent(DAGHistoryEvent event) {
    String domainId = sessionDomainId;
    if (historyACLPolicyManager == null) {
      return domainId;
    }

    TezDAGID dagId = event.getDAGID();
    HistoryEvent historyEvent = event.getHistoryEvent();
    if (dagId == null || !HistoryEventType.isDAGSpecificEvent(historyEvent.getEventType())) {
      return domainId;
    }

    if (dagDomainIdMap.containsKey(dagId)) {
      // If we already have the domain for the dag id return it
      domainId = dagDomainIdMap.get(dagId);
      // Cleanup if this is the last event.
      if (historyEvent.getEventType() == HistoryEventType.DAG_FINISHED) {
        dagDomainIdMap.remove(dagId);
      }
    } else if (HistoryEventType.DAG_SUBMITTED == historyEvent.getEventType()
        || HistoryEventType.DAG_RECOVERED == historyEvent.getEventType()) {
      // In case this is the first event for the dag, create and populate dag domain.
      Configuration conf;
      DAGPlan dagPlan;
      if (HistoryEventType.DAG_SUBMITTED == historyEvent.getEventType()) {
          conf = ((DAGSubmittedEvent)historyEvent).getConf();
          dagPlan = ((DAGSubmittedEvent)historyEvent).getDAGPlan();
      } else {
         conf = appContext.getCurrentDAG().getConf();
         dagPlan = appContext.getCurrentDAG().getJobPlan();
      }
      domainId = createDagDomain(conf, dagPlan, dagId);

      // createDagDomain updates skippedDAGs so another check here.
      if (skippedDAGs.contains(dagId)) {
        return null;
      }

      dagDomainIdMap.put(dagId, domainId);
    }
    return domainId;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java [374:415]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private String getDomainForEvent(DAGHistoryEvent event) {
    String domainId = sessionDomainId;
    if (historyACLPolicyManager == null) {
      return domainId;
    }

    TezDAGID dagId = event.getDAGID();
    HistoryEvent historyEvent = event.getHistoryEvent();
    if (dagId == null || !HistoryEventType.isDAGSpecificEvent(historyEvent.getEventType())) {
      return domainId;
    }

    if (dagDomainIdMap.containsKey(dagId)) {
      // If we already have the domain for the dag id return it
      domainId = dagDomainIdMap.get(dagId);
      // Cleanup if this is the last event.
      if (historyEvent.getEventType() == HistoryEventType.DAG_FINISHED) {
        dagDomainIdMap.remove(dagId);
      }
    } else if (HistoryEventType.DAG_SUBMITTED == historyEvent.getEventType()
        || HistoryEventType.DAG_RECOVERED == historyEvent.getEventType()) {
      // In case this is the first event for the dag, create and populate dag domain.
      Configuration conf;
      DAGPlan dagPlan;
      if (HistoryEventType.DAG_SUBMITTED == historyEvent.getEventType()) {
          conf = ((DAGSubmittedEvent)historyEvent).getConf();
          dagPlan = ((DAGSubmittedEvent)historyEvent).getDAGPlan();
      } else {
         conf = appContext.getCurrentDAG().getConf();
         dagPlan = appContext.getCurrentDAG().getJobPlan();
      }
      domainId = createDagDomain(conf, dagPlan, dagId);

      // createDagDomain updates skippedDAGs so another check here.
      if (skippedDAGs.contains(dagId)) {
        return null;
      }

      dagDomainIdMap.put(dagId, domainId);
    }
    return domainId;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



