org.apache.hadoop.yarn.applications.unmanagedamlauncher
Class UnmanagedAMLauncher

java.lang.Object
  extended by org.apache.hadoop.yarn.applications.unmanagedamlauncher.UnmanagedAMLauncher

public class UnmanagedAMLauncher
extends Object

The UnmanagedLauncher is a simple client that launches and unmanaged AM. An unmanagedAM is an AM that is not launched and managed by the RM. The client creates a new application on the RM and negotiates a new attempt id. Then it waits for the RM app state to reach be YarnApplicationState.ACCEPTED after which it spawns the AM in another process and passes it the container id via env variable Environment.CONTAINER_ID. The AM can be in any language. The AM can register with the RM using the attempt id obtained from the container id and proceed as normal. The client redirects app stdout and stderr to its own stdout and stderr and waits for the AM process to exit. Then it waits for the RM to report app completion.


Constructor Summary
UnmanagedAMLauncher()
           
UnmanagedAMLauncher(org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
 boolean init(String[] args)
           
 void launchAM(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
           
static void main(String[] args)
           
 boolean run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnmanagedAMLauncher

public UnmanagedAMLauncher(org.apache.hadoop.conf.Configuration conf)
                    throws Exception
Throws:
Exception

UnmanagedAMLauncher

public UnmanagedAMLauncher()
                    throws Exception
Throws:
Exception
Method Detail

main

public static void main(String[] args)
Parameters:
args - Command line arguments

init

public boolean init(String[] args)
             throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

launchAM

public void launchAM(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
              throws IOException,
                     org.apache.hadoop.yarn.exceptions.YarnException
Throws:
IOException
org.apache.hadoop.yarn.exceptions.YarnException

run

public boolean run()
            throws IOException,
                   org.apache.hadoop.yarn.exceptions.YarnException
Throws:
IOException
org.apache.hadoop.yarn.exceptions.YarnException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.