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 Flink 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,
List<URL> classpaths,
String... args)
Creates an instance that wraps the plan defined in the jar file using the given
argument.
|
PackagedProgram(File jarFile,
List<URL> classpaths,
String entryPointClassName,
String... args)
Creates an instance that wraps the plan defined in the jar file using the given
arguments.
|
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<URL> |
getAllLibraries() |
String[] |
getArguments() |
List<URL> |
getClasspaths()
Returns the classpaths that are required by the program.
|
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.
|
String |
getSavepointPath() |
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() |
void |
setSavepointPath(String savepointPath) |
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, List<URL> classpaths, String... args) throws ProgramInvocationException
jarFile - The jar file which contains the plan and a Manifest which defines
the program-classclasspaths - Additional classpath URLs needed by the Program.args - 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.entryPointClassName - 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 PackagedProgram(File jarFile, List<URL> classpaths, String entryPointClassName, String... args) throws ProgramInvocationException
jarFile - The jar file which contains the plan.classpaths - Additional classpath URLs needed by the Program.entryPointClassName - 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 void setSavepointPath(String savepointPath)
public String getSavepointPath()
public String[] getArguments()
public String getMainClassName()
public boolean isUsingInteractiveMode()
public boolean isUsingProgramEntryPoint()
public JobWithJars getPlanWithJars() throws ProgramInvocationException
ProgramInvocationExceptionpublic 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.public void invokeInteractiveModeForExecution()
throws ProgramInvocationException
ProgramInvocationExceptionpublic List<URL> getClasspaths()
URLs.public ClassLoader getUserCodeClassLoader()
ClassLoader that must be used to load user code classes.public void deleteExtractedLibraries()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.