public class AppSpec extends LaunchSpec
Based on Simple YARN App.
Modifier and Type | Field and Description |
---|---|
String |
appName
The name of the application given to YARN.
|
double |
disks
The number of disk resources (that is, disk channels) used by the process.
|
int |
memoryMb
The memory required in the allocated container, in MB.
|
String |
nodeLabelExpr
Optional node label expression for the launch.
|
int |
priority |
String |
queueName
The YARN queue in which to place the application launch request.
|
boolean |
unmanaged
Whether to run the AM in unmanaged mode.
|
int |
vCores
The number of YARN "vcores" (roughly equivalent to CPUs) to allocate to the
process.
|
Constructor and Description |
---|
AppSpec() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
createAppLaunchContext(org.apache.hadoop.yarn.conf.YarnConfiguration conf,
org.apache.hadoop.yarn.client.api.YarnClientApplication app)
Given this generic description of an application, create the detailed YARN
application submission context required to launch the application.
|
void |
dump(PrintStream out) |
org.apache.hadoop.yarn.api.records.Resource |
getCapability() |
createLaunchContext, getCommand
public int memoryMb
public int vCores
public double disks
public String appName
public String queueName
public int priority
public boolean unmanaged
public String nodeLabelExpr
public org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext createAppLaunchContext(org.apache.hadoop.yarn.conf.YarnConfiguration conf, org.apache.hadoop.yarn.client.api.YarnClientApplication app) throws IOException
conf
- the YARN configuration obtained by reading the Hadoop
configuration filesapp
- the YARN definition of the client application to be populated from
this generic descriptionIOException
- if localized resources are not found in the distributed file
system (such as HDFS)public org.apache.hadoop.yarn.api.records.Resource getCapability()
public void dump(PrintStream out)
dump
in class LaunchSpec
Copyright © 1970 The Apache Software Foundation. All rights reserved.