public class PackagedProgram extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS
Property name of the entry in JAR manifest file that describes the stratosphere specific entry point.
|
static String |
MANIFEST_ATTRIBUTE_MAIN_CLASS
Property name of the entry in JAR manifest file that describes the class with the main method.
|
| Constructor and Description |
|---|
PackagedProgram(File jarFile,
String... args)
Creates an instance that wraps the plan defined in the jar file using the given
argument.
|
PackagedProgram(File jarFile,
String entryPointClassName,
String... args)
Creates an instance that wraps the plan defined in the jar file using the given
arguments.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteExtractedLibraries()
Deletes all temporary files created for contained packaged libraries.
|
List<File> |
getAllLibraries() |
String[] |
getArguments() |
String |
getDescription()
Returns the description provided by the Program class.
|
String |
getMainClassName() |
JobWithJars |
getPlanWithJars()
Returns the plan with all required jars.
|
String |
getPreviewPlan()
Returns the analyzed plan without any optimizations.
|
ClassLoader |
getUserCodeClassLoader()
Gets the
ClassLoader that must be used to load user code classes. |
void |
invokeInteractiveModeForExecution()
This method assumes that the context environment is prepared, or the execution
will be a local execution by default.
|
boolean |
isUsingInteractiveMode() |
boolean |
isUsingProgramEntryPoint() |
public static final String MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS
public static final String MANIFEST_ATTRIBUTE_MAIN_CLASS
public PackagedProgram(File jarFile, String... args) throws ProgramInvocationException
jarFile - The jar file which contains the plan and a Manifest which defines
the program-classargs - Optional. The arguments used to create the pact plan, depend on
implementation of the pact plan. See getDescription().ProgramInvocationException - This invocation is thrown if the Program can't be properly loaded. Causes
may be a missing / wrong class or manifest files.public PackagedProgram(File jarFile, String entryPointClassName, String... args) throws ProgramInvocationException
jarFile - The jar file which contains the plan.className - Name of the class which generates the plan. Overrides the class defined
in the jar file manifestargs - Optional. The arguments used to create the pact plan, depend on
implementation of the pact plan. See getDescription().ProgramInvocationException - This invocation is thrown if the Program can't be properly loaded. Causes
may be a missing / wrong class or manifest files.public String[] getArguments()
public String getMainClassName()
public boolean isUsingInteractiveMode()
public boolean isUsingProgramEntryPoint()
public JobWithJars getPlanWithJars() throws ProgramInvocationException
JobInstantiationExceptionProgramInvocationExceptionpublic String getPreviewPlan() throws ProgramInvocationException
ProgramInvocationException - Thrown if an error occurred in the
user-provided pact assembler. This may indicate
missing parameters for generation.public String getDescription() throws ProgramInvocationException
ProgramInvocationException - This invocation is thrown if the Program can't be properly loaded. Causes
may be a missing / wrong class or manifest files.JobInstantiationException - Thrown if an error occurred in the user-provided pact assembler. This may indicate
missing parameters for generation.public void invokeInteractiveModeForExecution()
throws ProgramInvocationException
ProgramInvocationExceptionpublic ClassLoader getUserCodeClassLoader()
ClassLoader that must be used to load user code classes.public void deleteExtractedLibraries()
Copyright © 2013–2014. All rights reserved.