Class AppSpec

java.lang.Object
org.apache.drill.yarn.core.LaunchSpec
org.apache.drill.yarn.core.AppSpec

public class AppSpec extends LaunchSpec
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 Details

    • memoryMb

      public int memoryMb
      The memory required in the allocated container, in MB.
    • vCores

      public int vCores
      The number of YARN "vcores" (roughly equivalent to CPUs) to allocate to the process.
    • disks

      public double disks
      The number of disk resources (that is, disk channels) used by the process. Available only on some YARN distributions. Fractional values allowed.
    • appName

      public String appName
      The name of the application given to YARN. Appears in the YARN admin UI.
    • queueName

      public String queueName
      The YARN queue in which to place the application launch request.
    • priority

      public int priority
    • unmanaged

      public boolean unmanaged
      Whether to run the AM in unmanaged mode. Leave this false for production code.
    • nodeLabelExpr

      public String 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 files
      app - 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

      public void dump(PrintStream out)
      Overrides:
      dump in class LaunchSpec