tez-plugins/tez-yarn-timeline-history-with-fs/src/main/java/org/apache/tez/dag/history/logging/ats/ATSV15HistoryLoggingService.java [483:506]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private String createDagDomain(Configuration dagConf, DAGPlan dagPlan, TezDAGID dagId) {
    // In non session mode dag domain is same as session domain id.
    if (!appContext.isSession()) {
      return sessionDomainId;
    }
    DAGAccessControls dagAccessControls = dagPlan.hasAclInfo()
        ? DagTypeConverters.convertDAGAccessControlsFromProto(dagPlan.getAclInfo())
        : null;
    try {
      Map<String, String> domainInfo = historyACLPolicyManager.setupSessionDAGACLs(
          dagConf, appContext.getApplicationID(), Integer.toString(dagId.getId()),
          dagAccessControls);
      if (domainInfo != null) {
        return domainInfo.get(TezConfiguration.YARN_ATS_ACL_DAG_DOMAIN_ID);
      }
      // Fallback to session domain, if domainInfo was null
      return sessionDomainId;
    } catch (IOException | HistoryACLPolicyException e) {
      LOG.warn("Could not setup ACLs for DAG, disabling history logging for dag.", e);
      skippedDAGs.add(dagId);
      // Return value is not used, check for skippedDAG is important.
      return null;
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java [443:466]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private String createDagDomain(Configuration dagConf, DAGPlan dagPlan, TezDAGID dagId) {
    // In non session mode dag domain is same as session domain id.
    if (!appContext.isSession()) {
      return sessionDomainId;
    }
    DAGAccessControls dagAccessControls = dagPlan.hasAclInfo()
        ? DagTypeConverters.convertDAGAccessControlsFromProto(dagPlan.getAclInfo())
        : null;
    try {
      Map<String, String> domainInfo = historyACLPolicyManager.setupSessionDAGACLs(
          dagConf, appContext.getApplicationID(), Integer.toString(dagId.getId()),
          dagAccessControls);
      if (domainInfo != null) {
        return domainInfo.get(TezConfiguration.YARN_ATS_ACL_DAG_DOMAIN_ID);
      }
      // Fallback to session domain, if domainInfo was null
      return sessionDomainId;
    } catch (IOException | HistoryACLPolicyException e) {
      LOG.warn("Could not setup ACLs for DAG, disabling history logging for dag.", e);
      skippedDAGs.add(dagId);
      // Return value is not used, check for skippedDAG is important.
      return null;
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



