Package org.apache.nemo.client
Class JobLauncher
- java.lang.Object
-
- org.apache.nemo.client.JobLauncher
-
public final class JobLauncher extends java.lang.Object
Job launcher.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.reef.tang.Configuration
getBuiltJobConf()
Get the built job configuration.static <T> java.util.List<T>
getCollectedData()
Get the collected data.static org.apache.reef.tang.Configuration
getJobConf(java.lang.String[] args)
Get job configuration.static void
launchDAG(IRDAG dag)
Launch application using the application DAG.static void
launchDAG(IRDAG dag, java.lang.String jobId)
static void
launchDAG(IRDAG dag, java.util.Map<java.io.Serializable,java.lang.Object> broadcastVariables, java.lang.String jobId)
static void
main(java.lang.String[] args)
Main JobLauncher method.static void
setup(java.lang.String[] args)
Set up the driver, etc.static void
shutdown()
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Main JobLauncher method.- Parameters:
args
- arguments.- Throws:
java.lang.Exception
- exception on the way.
-
setup
public static void setup(java.lang.String[] args) throws org.apache.reef.tang.exceptions.InjectionException, java.lang.ClassNotFoundException, java.io.IOException, InvalidUserMainException
Set up the driver, etc. before the actual execution.- Parameters:
args
- arguments.- Throws:
org.apache.reef.tang.exceptions.InjectionException
- injection exception from REEF.java.lang.ClassNotFoundException
- class not found exception.java.io.IOException
- IO exception.InvalidUserMainException
-
shutdown
public static void shutdown()
-
launchDAG
public static void launchDAG(IRDAG dag)
Launch application using the application DAG. Notice that we launch the DAG one at a time, as the result of a DAG has to be immediately returned to the Java variable before the application can be resumed.- Parameters:
dag
- the application DAG.
-
launchDAG
public static void launchDAG(IRDAG dag, java.lang.String jobId)
- Parameters:
dag
- the application DAG.jobId
- job ID.
-
launchDAG
public static void launchDAG(IRDAG dag, java.util.Map<java.io.Serializable,java.lang.Object> broadcastVariables, java.lang.String jobId)
- Parameters:
dag
- the application DAG.broadcastVariables
- broadcast variables (can be empty).jobId
- job ID.
-
getJobConf
public static org.apache.reef.tang.Configuration getJobConf(java.lang.String[] args) throws java.io.IOException
Get job configuration.- Parameters:
args
- arguments to be processed as command line.- Returns:
- job configuration.
- Throws:
java.io.IOException
- exception while processing command line.
-
getBuiltJobConf
public static org.apache.reef.tang.Configuration getBuiltJobConf()
Get the built job configuration. It can benull
if this method is not called by the process which called the main function of this class.- Returns:
- the built job configuration.
-
getCollectedData
public static <T> java.util.List<T> getCollectedData()
Get the collected data.- Type Parameters:
T
- the type of the data.- Returns:
- the collected data.
-
-