BootstrapTools.getStartCommand(commandTemplate, startCommandValues); amContainer.setCommands(Collections.singletonList(amCommand));
ctx.setCommands(Collections.singletonList(launchCommand)); ctx.setLocalResources(taskManagerLocalResources);
private ContainerLaunchContext newContainerLaunchContext(Container container, String helixInstanceName) throws IOException { Path appWorkDir = GobblinClusterUtils.getAppWorkDirPath(this.fs, this.applicationName, this.applicationId); Path containerWorkDir = new Path(appWorkDir, GobblinYarnConfigurationKeys.CONTAINER_WORK_DIR_NAME); Map<String, LocalResource> resourceMap = Maps.newHashMap(); addContainerLocalResources(new Path(appWorkDir, GobblinYarnConfigurationKeys.LIB_JARS_DIR_NAME), resourceMap); addContainerLocalResources(new Path(containerWorkDir, GobblinYarnConfigurationKeys.APP_JARS_DIR_NAME), resourceMap); addContainerLocalResources( new Path(containerWorkDir, GobblinYarnConfigurationKeys.APP_FILES_DIR_NAME), resourceMap); if (this.config.hasPath(GobblinYarnConfigurationKeys.CONTAINER_FILES_REMOTE_KEY)) { addRemoteAppFiles(this.config.getString(GobblinYarnConfigurationKeys.CONTAINER_FILES_REMOTE_KEY), resourceMap); } ContainerLaunchContext containerLaunchContext = Records.newRecord(ContainerLaunchContext.class); containerLaunchContext.setLocalResources(resourceMap); containerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration)); containerLaunchContext.setCommands(Lists.newArrayList(buildContainerCommand(container, helixInstanceName))); if (UserGroupInformation.isSecurityEnabled()) { containerLaunchContext.setTokens(this.tokens.duplicate()); } return containerLaunchContext; }
/** * Given this generic description of an application, create the detailed YARN * application submission context required to launch the application. * * @param conf * the YARN configuration obtained by reading the Hadoop * configuration files * @return the completed application launch context for the given application * @throws IOException * if localized resources are not found in the distributed file * system (such as HDFS) */ public ContainerLaunchContext createLaunchContext(YarnConfiguration conf) throws IOException { // Set up the container launch context ContainerLaunchContext container = Records .newRecord(ContainerLaunchContext.class); // Set up the list of commands to run. Here, we assume that we run only // one command. container.setCommands(Collections.singletonList(getCommand())); // Add localized resources container.setLocalResources(resources); // Environment. container.setEnvironment(env); return container; }
ctx.setCommands( Collections.singletonList( (props.licencePath() != null ? "cp gridgain-license.xml ./ignite/*/ || true && " : "")
amContainer.setCommands( Collections.singletonList( Environment.JAVA_HOME.$() + "/bin/java -Xmx512m " + ApplicationMaster.class.getName()
amContainerLaunchContext.setLocalResources(appMasterLocalResources); amContainerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration)); amContainerLaunchContext.setCommands(Lists.newArrayList(buildApplicationMasterCommand(resource.getMemory()))); if (UserGroupInformation.isSecurityEnabled()) { setupSecurityTokens(amContainerLaunchContext);
@Override public void setCommands(List<String> commands) { launchContext.setCommands(commands); }
@Override public void setCommands(List<String> commands) { launchContext.setCommands(commands); }
@Override public void setCommands(List<String> commands) { launchContext.setCommands(commands); }
/** * @return a ContainerLaunchContext with the given commands and LocalResources. */ public static final ContainerLaunchContext getContainerLaunchContext( final List<String> commands, final Map<String, LocalResource> localResources) { final ContainerLaunchContext context = Records.newRecord(ContainerLaunchContext.class); context.setLocalResources(localResources); context.setCommands(commands); return context; }
public ContainerLaunchContext create(ContainerLaunchParameters parameters) { ContainerLaunchContext clc = Records.newRecord(ContainerLaunchContext.class); clc.setCommands(parameters.getCommands()); clc.setEnvironment(parameters.getEnvironment()); clc.setLocalResources(parameters.getLocalResources()); return clc; }
public static ContainerLaunchContext newContainerLaunchContext( Map<String, LocalResource> localResources, Map<String, String> environment, List<String> commands, Map<String, ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType, String> acls) { ContainerLaunchContext container = recordFactory .newRecordInstance(ContainerLaunchContext.class); container.setLocalResources(localResources); container.setEnvironment(environment); container.setCommands(commands); container.setServiceData(serviceData); container.setTokens(tokens); container.setApplicationACLs(acls); return container; }
public static ContainerLaunchContext newContainerLaunchContext( Map<String, LocalResource> localResources, Map<String, String> environment, List<String> commands, Map<String, ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType, String> acls) { ContainerLaunchContext container = recordFactory .newRecordInstance(ContainerLaunchContext.class); container.setLocalResources(localResources); container.setEnvironment(environment); container.setCommands(commands); container.setServiceData(serviceData); container.setTokens(tokens); container.setApplicationACLs(acls); return container; }
public static ContainerLaunchContext newContainerLaunchContext( Map<String, LocalResource> localResources, Map<String, String> environment, List<String> commands, Map<String, ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType, String> acls) { ContainerLaunchContext container = recordFactory .newRecordInstance(ContainerLaunchContext.class); container.setLocalResources(localResources); container.setEnvironment(environment); container.setCommands(commands); container.setServiceData(serviceData); container.setTokens(tokens); container.setApplicationACLs(acls); return container; }
/** * Compose the ContainerLaunchContext for the Application Master. * * @return the CLC object populated and configured. */ private ContainerLaunchContext buildContainerLaunchContext() throws IOException { ContainerLaunchContext appMasterContainer = Records.newRecord(ContainerLaunchContext.class); appMasterContainer.setEnvironment(buildEnvironment()); appMasterContainer.setLocalResources(buildLocalResourceMap()); appMasterContainer.setCommands(buildAppMasterExecCommand()); setToken(appMasterContainer); return appMasterContainer; }
/** * Compose the ContainerLaunchContext for the Application Master. * * @return the CLC object populated and configured. */ private ContainerLaunchContext buildContainerLaunchContext() throws IOException { ContainerLaunchContext appMasterContainer = Records.newRecord(ContainerLaunchContext.class); appMasterContainer.setEnvironment(buildEnvironment()); appMasterContainer.setLocalResources(buildLocalResourceMap()); appMasterContainer.setCommands(buildAppMasterExecCommand()); setToken(appMasterContainer); return appMasterContainer; }
@Public @Stable public static ContainerLaunchContext newInstance( Map<String, LocalResource> localResources, Map<String, String> environment, List<String> commands, Map<String, ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType, String> acls) { ContainerLaunchContext container = Records.newRecord(ContainerLaunchContext.class); container.setLocalResources(localResources); container.setEnvironment(environment); container.setCommands(commands); container.setServiceData(serviceData); container.setTokens(tokens); container.setApplicationACLs(acls); return container; }
@Public @Stable public static ContainerLaunchContext newInstance( Map<String, LocalResource> localResources, Map<String, String> environment, List<String> commands, Map<String, ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType, String> acls) { ContainerLaunchContext container = Records.newRecord(ContainerLaunchContext.class); container.setLocalResources(localResources); container.setEnvironment(environment); container.setCommands(commands); container.setServiceData(serviceData); container.setTokens(tokens); container.setApplicationACLs(acls); return container; }
private ContainerLaunchContext prepareContainerLaunchContext() throws IOException { ContainerLaunchContext clc = Records.newRecord(ContainerLaunchContext.class); clc.setCommands(Arrays.asList("/bin/sleep 5")); if (UserGroupInformation.isSecurityEnabled()) { clc.setTokens(getTokens()); clc.setTokensConf(getTokensConf()); } clc.setLocalResources(getLocalResources()); clc.setEnvironment(getEnvironment()); clc.setContainerRetryContext(getContainerRetryContext()); clc.setServiceData(getServiceData()); return clc; }