public static void run(ApplicationDescriptorImpl<? extends ApplicationDescriptor> appDesc,  String containerId, JobModel jobModel) {
    Optional<String> executionEnvContainerId =
        Optional.ofNullable(System.getenv(ShellCommandConfig.ENV_EXECUTION_ENV_CONTAINER_ID));
    Optional<String> samzaEpochId = Optional.ofNullable(System.getenv(EnvironmentVariables.SAMZA_EPOCH_ID));
    JobConfig jobConfig = new JobConfig(jobModel.getConfig());
    ContainerLaunchUtil.run(appDesc, jobConfig.getName().get(), jobConfig.getJobId(), containerId,
        executionEnvContainerId, samzaEpochId, jobModel);
  }
This method launches a Samza container in a managed cluster and is invoked by BeamContainerRunner.
Any change here needs to take Beam into account.
samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java