Package org.apache.drill.yarn.core
Class AppSpec
java.lang.Object
org.apache.drill.yarn.core.LaunchSpec
org.apache.drill.yarn.core.AppSpec
Abstract description of a remote process launch that describes the many
details needed to launch a process on a remote node. The YARN launch
specification is a mess to work with; this class provides a simpler facade to
gather the information, then turns around and builds the required YARN
object.
Based on Simple YARN App.
-
Field Summary
Modifier and TypeFieldDescriptionThe name of the application given to YARN.double
The number of disk resources (that is, disk channels) used by the process.int
The memory required in the allocated container, in MB.Optional node label expression for the launch.int
The YARN queue in which to place the application launch request.boolean
Whether to run the AM in unmanaged mode.int
The number of YARN "vcores" (roughly equivalent to CPUs) to allocate to the process. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.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
Methods inherited from class org.apache.drill.yarn.core.LaunchSpec
createLaunchContext, getCommand
-
Field Details
-
memoryMb
public int memoryMbThe memory required in the allocated container, in MB. -
vCores
public int vCoresThe number of YARN "vcores" (roughly equivalent to CPUs) to allocate to the process. -
disks
public double disksThe number of disk resources (that is, disk channels) used by the process. Available only on some YARN distributions. Fractional values allowed. -
appName
The name of the application given to YARN. Appears in the YARN admin UI. -
queueName
The YARN queue in which to place the application launch request. -
priority
public int priority -
unmanaged
public boolean unmanagedWhether to run the AM in unmanaged mode. Leave this false for production code. -
nodeLabelExpr
Optional node label expression for the launch. Selects the nodes on which the task can run.
-
-
Constructor Details
-
AppSpec
public AppSpec()
-
-
Method Details
-
createAppLaunchContext
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 Given this generic description of an application, create the detailed YARN application submission context required to launch the application.- Parameters:
conf
- the YARN configuration obtained by reading the Hadoop configuration filesapp
- the YARN definition of the client application to be populated from this generic description- Returns:
- 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)
-
getCapability
public org.apache.hadoop.yarn.api.records.Resource getCapability() -
dump
- Overrides:
dump
in classLaunchSpec
-