@Test public void testPrependDistcache() throws Exception { Assume.assumeTrue(Shell.WINDOWS); ContainerLaunchContext containerLaunchContext = recordFactory.newRecordInstance(ContainerLaunchContext.class); ApplicationId appId = ApplicationId.newInstance(0, 0); ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(appId, 1); ContainerId cId = ContainerId.newContainerId(appAttemptId, 0); Map<String, String> userSetEnv = new HashMap<String, String>(); userSetEnv.put(Environment.CONTAINER_ID.name(), "user_set_container_id"); userSetEnv.put(Environment.NM_HOST.name(), "user_set_NM_HOST"); userSetEnv.put(Environment.NM_PORT.name(), "user_set_NM_PORT"); userSetEnv.put(Environment.NM_HTTP_PORT.name(), "user_set_NM_HTTP_PORT"); userSetEnv.put(Environment.LOCAL_DIRS.name(), "user_set_LOCAL_DIR"); userSetEnv.put(Environment.USER.key(), "user_set_" + Environment.USER.key()); userSetEnv.put(Environment.LOGNAME.name(), "user_set_LOGNAME"); userSetEnv.put(Environment.PWD.name(), "user_set_PWD"); userSetEnv.put(Environment.HOME.name(), "user_set_HOME"); userSetEnv.put(Environment.CLASSPATH.name(), "APATH"); containerLaunchContext.setEnvironment(userSetEnv); Container container = mock(Container.class); when(container.getContainerId()).thenReturn(cId); when(container.getLaunchContext()).thenReturn(containerLaunchContext); when(container.getLocalizedResources()).thenReturn(null); Dispatcher dispatcher = mock(Dispatcher.class); EventHandler eventHandler = new EventHandler() { public void handle(Event event) { Assert.assertTrue(event instanceof ContainerExitEvent); ContainerExitEvent exitEvent = (ContainerExitEvent) event; Assert.assertEquals(ContainerEventType.CONTAINER_EXITED_WITH_FAILURE, exitEvent.getType()); } }; when(dispatcher.getEventHandler()).thenReturn(eventHandler); Configuration conf = new Configuration(); ContainerLaunch launch = new ContainerLaunch(distContext, conf, dispatcher, exec, null, container, dirsHandler, containerManager); String testDir = System.getProperty("test.build.data", "target/test-dir"); Path pwd = new Path(testDir); List<Path> appDirs = new ArrayList<Path>(); List<String> userLocalDirs = new ArrayList<>(); List<String> containerLogs = new ArrayList<String>(); Map<Path, List<String>> resources = new HashMap<Path, List<String>>(); Path userjar = new Path("user.jar"); List<String> lpaths = new ArrayList<String>(); lpaths.add("userjarlink.jar"); resources.put(userjar, lpaths); Path nmp = new Path(testDir); launch.sanitizeEnv( userSetEnv, pwd, appDirs, userLocalDirs, containerLogs, resources, nmp); List<String> result = getJarManifestClasspath(userSetEnv.get(Environment.CLASSPATH.name())); Assert.assertTrue(result.size() > 1); Assert.assertTrue( result.get(result.size() - 1).endsWith("userjarlink.jar")); userSetEnv.put(Environment.CLASSPATH_PREPEND_DISTCACHE.name(), "true"); cId = ContainerId.newContainerId(appAttemptId, 1); when(container.getContainerId()).thenReturn(cId); launch = new ContainerLaunch(distContext, conf, dispatcher, exec, null, container, dirsHandler, containerManager); launch.sanitizeEnv( userSetEnv, pwd, appDirs, userLocalDirs, containerLogs, resources, nmp); result = getJarManifestClasspath(userSetEnv.get(Environment.CLASSPATH.name())); Assert.assertTrue(result.size() > 1); Assert.assertTrue( result.get(0).endsWith("userjarlink.jar")); }
public void sanitizeEnv(Map<String, String> environment, Path pwd, List<Path> appDirs, List<String> userLocalDirs, List<String> containerLogDirs, Map<Path, List<String>> resources, Path nmPrivateClasspathJarDir) throws IOException { environment.put(Environment.CONTAINER_ID.name(), container .getContainerId().toString()); environment.put(Environment.NM_PORT.name(), String.valueOf(this.context.getNodeId().getPort())); environment.put(Environment.NM_HOST.name(), this.context.getNodeId() .getHost()); environment.put(Environment.NM_HTTP_PORT.name(), String.valueOf(this.context.getHttpPort())); environment.put(Environment.LOCAL_DIRS.name(), StringUtils.join(",", appDirs)); environment.put(Environment.LOCAL_USER_DIRS.name(), StringUtils.join(",", userLocalDirs)); environment.put(Environment.LOG_DIRS.name(), StringUtils.join(",", containerLogDirs)); environment.put(Environment.USER.name(), container.getUser()); environment.put(Environment.LOGNAME.name(), container.getUser()); environment.put(Environment.HOME.name(), conf.get( YarnConfiguration.NM_USER_HOME_DIR, YarnConfiguration.DEFAULT_NM_USER_HOME_DIR ) ); environment.put(Environment.PWD.name(), pwd.toString()); putEnvIfNotNull(environment, Environment.HADOOP_CONF_DIR.name(), System.getenv(Environment.HADOOP_CONF_DIR.name()) ); if (!Shell.WINDOWS) { environment.put("JVM_PID", "$$"); } String[] whitelist = conf.get(YarnConfiguration.NM_ENV_WHITELIST, YarnConfiguration.DEFAULT_NM_ENV_WHITELIST).split(","); for(String whitelistEnvVariable : whitelist) { putEnvIfAbsent(environment, whitelistEnvVariable.trim()); } Apps.setEnvFromInputString(environment, conf.get( YarnConfiguration.NM_ADMIN_USER_ENV, YarnConfiguration.DEFAULT_NM_ADMIN_USER_ENV), File.pathSeparator); if (Shell.WINDOWS) { String inputClassPath = environment.get(Environment.CLASSPATH.name()); if (inputClassPath != null && !inputClassPath.isEmpty()) { boolean preferLocalizedJars = Boolean.valueOf( environment.get(Environment.CLASSPATH_PREPEND_DISTCACHE.name()) ); boolean needsSeparator = false; StringBuilder newClassPath = new StringBuilder(); if (!preferLocalizedJars) { newClassPath.append(inputClassPath); needsSeparator = true; } for (Map.Entry<Path,List<String>> entry : resources.entrySet()) { boolean targetIsDirectory = new File(entry.getKey().toUri().getPath()) .isDirectory(); for (String linkName : entry.getValue()) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } else { needsSeparator = true; } newClassPath.append(pwd.toString()) .append(Path.SEPARATOR).append(linkName); if (targetIsDirectory) { newClassPath.append(Path.SEPARATOR); } } } if (preferLocalizedJars) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } newClassPath.append(inputClassPath); } Map<String, String> mergedEnv = new HashMap<String, String>( System.getenv()); mergedEnv.putAll(environment); Path jarDir; if (exec instanceof WindowsSecureContainerExecutor) { jarDir = nmPrivateClasspathJarDir; } else { jarDir = pwd; } String[] jarCp = FileUtil.createJarWithClassPath( newClassPath.toString(), jarDir, pwd, mergedEnv); Path localizedClassPathJar = exec.localizeClasspathJar( new Path(jarCp[0]), pwd, container.getUser()); String replacementClassPath = localizedClassPathJar.toString() + jarCp[1]; environment.put(Environment.CLASSPATH.name(), replacementClassPath); } } for (Map.Entry<String, ByteBuffer> meta : containerManager .getAuxServiceMetaData().entrySet()) { AuxiliaryServiceHelper.setServiceDataIntoEnv( meta.getKey(), meta.getValue(), environment); } }
ContainerLaunch implements Callable<Integer> { public void sanitizeEnv(Map<String, String> environment, Path pwd, List<Path> appDirs, List<String> userLocalDirs, List<String> containerLogDirs, Map<Path, List<String>> resources, Path nmPrivateClasspathJarDir) throws IOException { environment.put(Environment.CONTAINER_ID.name(), container .getContainerId().toString()); environment.put(Environment.NM_PORT.name(), String.valueOf(this.context.getNodeId().getPort())); environment.put(Environment.NM_HOST.name(), this.context.getNodeId() .getHost()); environment.put(Environment.NM_HTTP_PORT.name(), String.valueOf(this.context.getHttpPort())); environment.put(Environment.LOCAL_DIRS.name(), StringUtils.join(",", appDirs)); environment.put(Environment.LOCAL_USER_DIRS.name(), StringUtils.join(",", userLocalDirs)); environment.put(Environment.LOG_DIRS.name(), StringUtils.join(",", containerLogDirs)); environment.put(Environment.USER.name(), container.getUser()); environment.put(Environment.LOGNAME.name(), container.getUser()); environment.put(Environment.HOME.name(), conf.get( YarnConfiguration.NM_USER_HOME_DIR, YarnConfiguration.DEFAULT_NM_USER_HOME_DIR ) ); environment.put(Environment.PWD.name(), pwd.toString()); putEnvIfNotNull(environment, Environment.HADOOP_CONF_DIR.name(), System.getenv(Environment.HADOOP_CONF_DIR.name()) ); if (!Shell.WINDOWS) { environment.put("JVM_PID", "$$"); } String[] whitelist = conf.get(YarnConfiguration.NM_ENV_WHITELIST, YarnConfiguration.DEFAULT_NM_ENV_WHITELIST).split(","); for(String whitelistEnvVariable : whitelist) { putEnvIfAbsent(environment, whitelistEnvVariable.trim()); } Apps.setEnvFromInputString(environment, conf.get( YarnConfiguration.NM_ADMIN_USER_ENV, YarnConfiguration.DEFAULT_NM_ADMIN_USER_ENV), File.pathSeparator); if (Shell.WINDOWS) { String inputClassPath = environment.get(Environment.CLASSPATH.name()); if (inputClassPath != null && !inputClassPath.isEmpty()) { boolean preferLocalizedJars = Boolean.valueOf( environment.get(Environment.CLASSPATH_PREPEND_DISTCACHE.name()) ); boolean needsSeparator = false; StringBuilder newClassPath = new StringBuilder(); if (!preferLocalizedJars) { newClassPath.append(inputClassPath); needsSeparator = true; } for (Map.Entry<Path,List<String>> entry : resources.entrySet()) { boolean targetIsDirectory = new File(entry.getKey().toUri().getPath()) .isDirectory(); for (String linkName : entry.getValue()) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } else { needsSeparator = true; } newClassPath.append(pwd.toString()) .append(Path.SEPARATOR).append(linkName); if (targetIsDirectory) { newClassPath.append(Path.SEPARATOR); } } } if (preferLocalizedJars) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } newClassPath.append(inputClassPath); } Map<String, String> mergedEnv = new HashMap<String, String>( System.getenv()); mergedEnv.putAll(environment); Path jarDir; if (exec instanceof WindowsSecureContainerExecutor) { jarDir = nmPrivateClasspathJarDir; } else { jarDir = pwd; } String[] jarCp = FileUtil.createJarWithClassPath( newClassPath.toString(), jarDir, pwd, mergedEnv); Path localizedClassPathJar = exec.localizeClasspathJar( new Path(jarCp[0]), pwd, container.getUser()); String replacementClassPath = localizedClassPathJar.toString() + jarCp[1]; environment.put(Environment.CLASSPATH.name(), replacementClassPath); } } for (Map.Entry<String, ByteBuffer> meta : containerManager .getAuxServiceMetaData().entrySet()) { AuxiliaryServiceHelper.setServiceDataIntoEnv( meta.getKey(), meta.getValue(), environment); } } }
ContainerLaunch implements Callable<Integer> { public void sanitizeEnv(Map<String, String> environment, Path pwd, List<Path> appDirs, List<String> userLocalDirs, List<String> containerLogDirs, Map<Path, List<String>> resources, Path nmPrivateClasspathJarDir) throws IOException { environment.put(Environment.CONTAINER_ID.name(), container .getContainerId().toString()); environment.put(Environment.NM_PORT.name(), String.valueOf(this.context.getNodeId().getPort())); environment.put(Environment.NM_HOST.name(), this.context.getNodeId() .getHost()); environment.put(Environment.NM_HTTP_PORT.name(), String.valueOf(this.context.getHttpPort())); environment.put(Environment.LOCAL_DIRS.name(), StringUtils.join(",", appDirs)); environment.put(Environment.LOCAL_USER_DIRS.name(), StringUtils.join(",", userLocalDirs)); environment.put(Environment.LOG_DIRS.name(), StringUtils.join(",", containerLogDirs)); environment.put(Environment.USER.name(), container.getUser()); environment.put(Environment.LOGNAME.name(), container.getUser()); environment.put(Environment.HOME.name(), conf.get( YarnConfiguration.NM_USER_HOME_DIR, YarnConfiguration.DEFAULT_NM_USER_HOME_DIR ) ); environment.put(Environment.PWD.name(), pwd.toString()); putEnvIfNotNull(environment, Environment.HADOOP_CONF_DIR.name(), System.getenv(Environment.HADOOP_CONF_DIR.name()) ); if (!Shell.WINDOWS) { environment.put("JVM_PID", "$$"); } String[] whitelist = conf.get(YarnConfiguration.NM_ENV_WHITELIST, YarnConfiguration.DEFAULT_NM_ENV_WHITELIST).split(","); for(String whitelistEnvVariable : whitelist) { putEnvIfAbsent(environment, whitelistEnvVariable.trim()); } Apps.setEnvFromInputString(environment, conf.get( YarnConfiguration.NM_ADMIN_USER_ENV, YarnConfiguration.DEFAULT_NM_ADMIN_USER_ENV), File.pathSeparator); if (Shell.WINDOWS) { String inputClassPath = environment.get(Environment.CLASSPATH.name()); if (inputClassPath != null && !inputClassPath.isEmpty()) { boolean preferLocalizedJars = Boolean.valueOf( environment.get(Environment.CLASSPATH_PREPEND_DISTCACHE.name()) ); boolean needsSeparator = false; StringBuilder newClassPath = new StringBuilder(); if (!preferLocalizedJars) { newClassPath.append(inputClassPath); needsSeparator = true; } for (Map.Entry<Path,List<String>> entry : resources.entrySet()) { boolean targetIsDirectory = new File(entry.getKey().toUri().getPath()) .isDirectory(); for (String linkName : entry.getValue()) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } else { needsSeparator = true; } newClassPath.append(pwd.toString()) .append(Path.SEPARATOR).append(linkName); if (targetIsDirectory) { newClassPath.append(Path.SEPARATOR); } } } if (preferLocalizedJars) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } newClassPath.append(inputClassPath); } Map<String, String> mergedEnv = new HashMap<String, String>( System.getenv()); mergedEnv.putAll(environment); Path jarDir; if (exec instanceof WindowsSecureContainerExecutor) { jarDir = nmPrivateClasspathJarDir; } else { jarDir = pwd; } String[] jarCp = FileUtil.createJarWithClassPath( newClassPath.toString(), jarDir, pwd, mergedEnv); Path localizedClassPathJar = exec.localizeClasspathJar( new Path(jarCp[0]), pwd, container.getUser()); String replacementClassPath = localizedClassPathJar.toString() + jarCp[1]; environment.put(Environment.CLASSPATH.name(), replacementClassPath); } } for (Map.Entry<String, ByteBuffer> meta : containerManager .getAuxServiceMetaData().entrySet()) { AuxiliaryServiceHelper.setServiceDataIntoEnv( meta.getKey(), meta.getValue(), environment); } } ContainerLaunch(Context context, Configuration configuration,
      Dispatcher dispatcher, ContainerExecutor exec, Application app,
      Container container, LocalDirsHandlerService dirsHandler,
      ContainerManagerImpl containerManager); }
ContainerLaunch implements Callable<Integer> { public void sanitizeEnv(Map<String, String> environment, Path pwd, List<Path> appDirs, List<String> userLocalDirs, List<String> containerLogDirs, Map<Path, List<String>> resources, Path nmPrivateClasspathJarDir) throws IOException { environment.put(Environment.CONTAINER_ID.name(), container .getContainerId().toString()); environment.put(Environment.NM_PORT.name(), String.valueOf(this.context.getNodeId().getPort())); environment.put(Environment.NM_HOST.name(), this.context.getNodeId() .getHost()); environment.put(Environment.NM_HTTP_PORT.name(), String.valueOf(this.context.getHttpPort())); environment.put(Environment.LOCAL_DIRS.name(), StringUtils.join(",", appDirs)); environment.put(Environment.LOCAL_USER_DIRS.name(), StringUtils.join(",", userLocalDirs)); environment.put(Environment.LOG_DIRS.name(), StringUtils.join(",", containerLogDirs)); environment.put(Environment.USER.name(), container.getUser()); environment.put(Environment.LOGNAME.name(), container.getUser()); environment.put(Environment.HOME.name(), conf.get( YarnConfiguration.NM_USER_HOME_DIR, YarnConfiguration.DEFAULT_NM_USER_HOME_DIR ) ); environment.put(Environment.PWD.name(), pwd.toString()); putEnvIfNotNull(environment, Environment.HADOOP_CONF_DIR.name(), System.getenv(Environment.HADOOP_CONF_DIR.name()) ); if (!Shell.WINDOWS) { environment.put("JVM_PID", "$$"); } String[] whitelist = conf.get(YarnConfiguration.NM_ENV_WHITELIST, YarnConfiguration.DEFAULT_NM_ENV_WHITELIST).split(","); for(String whitelistEnvVariable : whitelist) { putEnvIfAbsent(environment, whitelistEnvVariable.trim()); } Apps.setEnvFromInputString(environment, conf.get( YarnConfiguration.NM_ADMIN_USER_ENV, YarnConfiguration.DEFAULT_NM_ADMIN_USER_ENV), File.pathSeparator); if (Shell.WINDOWS) { String inputClassPath = environment.get(Environment.CLASSPATH.name()); if (inputClassPath != null && !inputClassPath.isEmpty()) { boolean preferLocalizedJars = Boolean.valueOf( environment.get(Environment.CLASSPATH_PREPEND_DISTCACHE.name()) ); boolean needsSeparator = false; StringBuilder newClassPath = new StringBuilder(); if (!preferLocalizedJars) { newClassPath.append(inputClassPath); needsSeparator = true; } for (Map.Entry<Path,List<String>> entry : resources.entrySet()) { boolean targetIsDirectory = new File(entry.getKey().toUri().getPath()) .isDirectory(); for (String linkName : entry.getValue()) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } else { needsSeparator = true; } newClassPath.append(pwd.toString()) .append(Path.SEPARATOR).append(linkName); if (targetIsDirectory) { newClassPath.append(Path.SEPARATOR); } } } if (preferLocalizedJars) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } newClassPath.append(inputClassPath); } Map<String, String> mergedEnv = new HashMap<String, String>( System.getenv()); mergedEnv.putAll(environment); Path jarDir; if (exec instanceof WindowsSecureContainerExecutor) { jarDir = nmPrivateClasspathJarDir; } else { jarDir = pwd; } String[] jarCp = FileUtil.createJarWithClassPath( newClassPath.toString(), jarDir, pwd, mergedEnv); Path localizedClassPathJar = exec.localizeClasspathJar( new Path(jarCp[0]), pwd, container.getUser()); String replacementClassPath = localizedClassPathJar.toString() + jarCp[1]; environment.put(Environment.CLASSPATH.name(), replacementClassPath); } } for (Map.Entry<String, ByteBuffer> meta : containerManager .getAuxServiceMetaData().entrySet()) { AuxiliaryServiceHelper.setServiceDataIntoEnv( meta.getKey(), meta.getValue(), environment); } } ContainerLaunch(Context context, Configuration configuration,
      Dispatcher dispatcher, ContainerExecutor exec, Application app,
      Container container, LocalDirsHandlerService dirsHandler,
      ContainerManagerImpl containerManager); @VisibleForTesting static String expandEnvironment(String var,
      Path containerLogDir); @Override @SuppressWarnings("unchecked") // dispatcher not typed Integer call(); @SuppressWarnings("unchecked") // dispatcher not typed void cleanupContainer(); static String getRelativeContainerLogDir(String appIdStr,
      String containerIdStr); void sanitizeEnv(Map<String, String> environment, Path pwd,
      List<Path> appDirs, List<String> userLocalDirs, List<String>
      containerLogDirs,
      Map<Path, List<String>> resources,
      Path nmPrivateClasspathJarDir); static String getExitCodeFile(String pidFile); }
ContainerLaunch implements Callable<Integer> { public void sanitizeEnv(Map<String, String> environment, Path pwd, List<Path> appDirs, List<String> userLocalDirs, List<String> containerLogDirs, Map<Path, List<String>> resources, Path nmPrivateClasspathJarDir) throws IOException { environment.put(Environment.CONTAINER_ID.name(), container .getContainerId().toString()); environment.put(Environment.NM_PORT.name(), String.valueOf(this.context.getNodeId().getPort())); environment.put(Environment.NM_HOST.name(), this.context.getNodeId() .getHost()); environment.put(Environment.NM_HTTP_PORT.name(), String.valueOf(this.context.getHttpPort())); environment.put(Environment.LOCAL_DIRS.name(), StringUtils.join(",", appDirs)); environment.put(Environment.LOCAL_USER_DIRS.name(), StringUtils.join(",", userLocalDirs)); environment.put(Environment.LOG_DIRS.name(), StringUtils.join(",", containerLogDirs)); environment.put(Environment.USER.name(), container.getUser()); environment.put(Environment.LOGNAME.name(), container.getUser()); environment.put(Environment.HOME.name(), conf.get( YarnConfiguration.NM_USER_HOME_DIR, YarnConfiguration.DEFAULT_NM_USER_HOME_DIR ) ); environment.put(Environment.PWD.name(), pwd.toString()); putEnvIfNotNull(environment, Environment.HADOOP_CONF_DIR.name(), System.getenv(Environment.HADOOP_CONF_DIR.name()) ); if (!Shell.WINDOWS) { environment.put("JVM_PID", "$$"); } String[] whitelist = conf.get(YarnConfiguration.NM_ENV_WHITELIST, YarnConfiguration.DEFAULT_NM_ENV_WHITELIST).split(","); for(String whitelistEnvVariable : whitelist) { putEnvIfAbsent(environment, whitelistEnvVariable.trim()); } Apps.setEnvFromInputString(environment, conf.get( YarnConfiguration.NM_ADMIN_USER_ENV, YarnConfiguration.DEFAULT_NM_ADMIN_USER_ENV), File.pathSeparator); if (Shell.WINDOWS) { String inputClassPath = environment.get(Environment.CLASSPATH.name()); if (inputClassPath != null && !inputClassPath.isEmpty()) { boolean preferLocalizedJars = Boolean.valueOf( environment.get(Environment.CLASSPATH_PREPEND_DISTCACHE.name()) ); boolean needsSeparator = false; StringBuilder newClassPath = new StringBuilder(); if (!preferLocalizedJars) { newClassPath.append(inputClassPath); needsSeparator = true; } for (Map.Entry<Path,List<String>> entry : resources.entrySet()) { boolean targetIsDirectory = new File(entry.getKey().toUri().getPath()) .isDirectory(); for (String linkName : entry.getValue()) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } else { needsSeparator = true; } newClassPath.append(pwd.toString()) .append(Path.SEPARATOR).append(linkName); if (targetIsDirectory) { newClassPath.append(Path.SEPARATOR); } } } if (preferLocalizedJars) { if (needsSeparator) { newClassPath.append(File.pathSeparator); } newClassPath.append(inputClassPath); } Map<String, String> mergedEnv = new HashMap<String, String>( System.getenv()); mergedEnv.putAll(environment); Path jarDir; if (exec instanceof WindowsSecureContainerExecutor) { jarDir = nmPrivateClasspathJarDir; } else { jarDir = pwd; } String[] jarCp = FileUtil.createJarWithClassPath( newClassPath.toString(), jarDir, pwd, mergedEnv); Path localizedClassPathJar = exec.localizeClasspathJar( new Path(jarCp[0]), pwd, container.getUser()); String replacementClassPath = localizedClassPathJar.toString() + jarCp[1]; environment.put(Environment.CLASSPATH.name(), replacementClassPath); } } for (Map.Entry<String, ByteBuffer> meta : containerManager .getAuxServiceMetaData().entrySet()) { AuxiliaryServiceHelper.setServiceDataIntoEnv( meta.getKey(), meta.getValue(), environment); } } ContainerLaunch(Context context, Configuration configuration,
      Dispatcher dispatcher, ContainerExecutor exec, Application app,
      Container container, LocalDirsHandlerService dirsHandler,
      ContainerManagerImpl containerManager); @VisibleForTesting static String expandEnvironment(String var,
      Path containerLogDir); @Override @SuppressWarnings("unchecked") // dispatcher not typed Integer call(); @SuppressWarnings("unchecked") // dispatcher not typed void cleanupContainer(); static String getRelativeContainerLogDir(String appIdStr,
      String containerIdStr); void sanitizeEnv(Map<String, String> environment, Path pwd,
      List<Path> appDirs, List<String> userLocalDirs, List<String>
      containerLogDirs,
      Map<Path, List<String>> resources,
      Path nmPrivateClasspathJarDir); static String getExitCodeFile(String pidFile); static final String CONTAINER_SCRIPT; static final String FINAL_CONTAINER_TOKENS_FILE; }