gobblin-temporal/src/main/java/org/apache/gobblin/temporal/yarn/GobblinTemporalYarnTaskRunner.java [60:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        .withValue(GobblinYarnConfigurationKeys.CONTAINER_NUM_KEY,
            ConfigValueFactory.fromAnyRef(YarnHelixUtils.getContainerNum(containerId.toString()))), appWorkDirOptional);
  }

  @Override
  public List<Service> getServices() {
    List<Service> services = new ArrayList<>();
    services.addAll(super.getServices());
    LogCopier logCopier = null;
    if (clusterConfig.hasPath(GobblinYarnConfigurationKeys.LOGS_SINK_ROOT_DIR_KEY)) {
      GobblinYarnLogSource gobblinYarnLogSource = new GobblinYarnLogSource();
      String containerLogDir = clusterConfig.getString(GobblinYarnConfigurationKeys.LOGS_SINK_ROOT_DIR_KEY);

      if (gobblinYarnLogSource.isLogSourcePresent()) {
        try {
          logCopier = gobblinYarnLogSource.buildLogCopier(this.clusterConfig, this.taskRunnerId, this.fs,
              new Path(containerLogDir, GobblinClusterUtils.getAppWorkDirPath(this.applicationName, this.applicationId)));
            services.add(logCopier);
        } catch (Exception e) {
          LOGGER.warn("Cannot add LogCopier service to the service manager due to", e);
        }
      }
    }
    if (UserGroupInformation.isSecurityEnabled()) {
      LOGGER.info("Adding YarnContainerSecurityManager since security is enabled");
      services.add(new YarnContainerSecurityManager(this.clusterConfig, this.fs, this.eventBus, logCopier));
    }
    return services;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnTaskRunner.java [66:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        .withValue(GobblinYarnConfigurationKeys.CONTAINER_NUM_KEY,
            ConfigValueFactory.fromAnyRef(YarnHelixUtils.getContainerNum(containerId.toString()))), appWorkDirOptional);
  }

  @Override
  public List<Service> getServices() {
    List<Service> services = new ArrayList<>();
    services.addAll(super.getServices());
    LogCopier logCopier = null;
    if (clusterConfig.hasPath(GobblinYarnConfigurationKeys.LOGS_SINK_ROOT_DIR_KEY)) {
      GobblinYarnLogSource gobblinYarnLogSource = new GobblinYarnLogSource();
      String containerLogDir = clusterConfig.getString(GobblinYarnConfigurationKeys.LOGS_SINK_ROOT_DIR_KEY);

      if (gobblinYarnLogSource.isLogSourcePresent()) {
        try {
          logCopier = gobblinYarnLogSource.buildLogCopier(this.clusterConfig, this.taskRunnerId, this.fs,
              new Path(containerLogDir, GobblinClusterUtils.getAppWorkDirPath(this.applicationName, this.applicationId)));
            services.add(logCopier);
        } catch (Exception e) {
          LOGGER.warn("Cannot add LogCopier service to the service manager due to", e);
        }
      }
    }
    if (UserGroupInformation.isSecurityEnabled()) {
      LOGGER.info("Adding YarnContainerSecurityManager since security is enabled");
      services.add(new YarnContainerSecurityManager(this.clusterConfig, this.fs, this.eventBus, logCopier));
    }
    return services;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



