public class AppMasterLauncher extends AbstractLauncher
| Modifier and Type | Field and Description |
|---|---|
org.apache.hadoop.yarn.api.records.ApplicationId |
appId |
org.apache.hadoop.yarn.client.api.YarnClientApplication |
application |
String |
name |
boolean |
secureCluster |
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
submissionContext |
String |
type |
CLASSPATH, commands, containerLaunchContext, coreFileSystem, credentials, env, envVars, localResources, logAggregationContext, MAPREDUCE_JOB_CREDENTIALS_BINARY| Constructor and Description |
|---|
AppMasterLauncher(String name,
String type,
org.apache.hadoop.conf.Configuration conf,
CoreFileSystem fs,
SliderYarnClientImpl yarnClient,
boolean secureCluster,
Map<String,String> options,
Map<String,String> resourceGlobalOptions,
Set<String> applicationTags)
Build the AM Launcher
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
completeAppMasterLaunch()
Complete the launch context (copy in env vars, etc).
|
SerializedApplicationReport |
createSerializedApplicationReport()
Build a serializable application report.
|
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
int |
getMaxAppAttempts() |
int |
getPriority() |
String |
getQueue() |
org.apache.hadoop.yarn.api.records.Resource |
getResource() |
boolean |
isKeepContainersOverRestarts() |
void |
setKeepContainersOverRestarts(boolean keepContainersOverRestarts) |
void |
setMaxAppAttempts(int maxAppAttempts) |
void |
setMemory(int memory) |
void |
setPriority(int priority) |
void |
setQueue(String queue) |
void |
setVirtualCores(int cores) |
LaunchedApplication |
submitApplication()
Submit the application.
|
addCommand, addCommandLine, addCommands, addLocalResource, addLocalResources, completeContainerLaunch, copyEnvVars, dumpEnvToString, extractAmRetryCount, extractLabelExpression, extractLogAggregationContext, extractResourceRequirements, getCommands, getCommandsAsString, getContainerLaunchContext, getCredentials, getEnv, getLocalResources, getServiceData, propagateUsernameInInsecureCluster, putEnv, setClasspath, setEnv, submitDirectorypublic final org.apache.hadoop.yarn.client.api.YarnClientApplication application
public final String name
public final String type
public final org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext
public final org.apache.hadoop.yarn.api.records.ApplicationId appId
public final boolean secureCluster
public AppMasterLauncher(String name, String type, org.apache.hadoop.conf.Configuration conf, CoreFileSystem fs, SliderYarnClientImpl yarnClient, boolean secureCluster, Map<String,String> options, Map<String,String> resourceGlobalOptions, Set<String> applicationTags) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
name - app nametype - application typeconf - hadoop configfs - filesystem bindingyarnClient - yarn clientsecureCluster - flag to indicate secure clusteroptions - map of options. All values are extracted in this constructor onlyresourceGlobalOptions - global optionsapplicationTags - any app tagsIOExceptionorg.apache.hadoop.yarn.exceptions.YarnExceptionpublic void setMaxAppAttempts(int maxAppAttempts)
public void setKeepContainersOverRestarts(boolean keepContainersOverRestarts)
public org.apache.hadoop.yarn.api.records.Resource getResource()
public void setMemory(int memory)
public void setVirtualCores(int cores)
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
public int getMaxAppAttempts()
public boolean isKeepContainersOverRestarts()
public String getQueue()
public int getPriority()
public void setQueue(String queue)
public void setPriority(int priority)
public org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext completeAppMasterLaunch()
throws IOException
IOExceptionpublic LaunchedApplication submitApplication() throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
IOExceptionorg.apache.hadoop.yarn.exceptions.YarnExceptionpublic SerializedApplicationReport createSerializedApplicationReport()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.