public class PackagedProgram extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
PackagedProgram.Builder
A Builder For
PackagedProgram . |
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.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static List<File> |
extractContainedLibraries(URL jarFile)
Takes all JAR files that are contained in this program's JAR file and extracts them to the
system's temp directory.
|
String[] |
getArguments() |
List<URL> |
getClasspaths()
Returns the classpaths that are required by the program.
|
String |
getDescription()
Returns the description provided by the Program class.
|
List<URL> |
getJobJarAndDependencies()
Returns all provided libraries needed to run the program.
|
static List<URL> |
getJobJarAndDependencies(File jarFile,
String entryPointClassName)
Returns all provided libraries needed to run the program.
|
String |
getMainClassName() |
SavepointRestoreSettings |
getSavepointSettings() |
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.
|
static PackagedProgram.Builder |
newBuilder() |
public static final String MANIFEST_ATTRIBUTE_ASSEMBLER_CLASS
public static final String MANIFEST_ATTRIBUTE_MAIN_CLASS
public SavepointRestoreSettings getSavepointSettings()
public String[] getArguments()
public String getMainClassName()
@Nullable 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
ProgramInvocationException
public List<URL> getClasspaths()
URL
s.public ClassLoader getUserCodeClassLoader()
ClassLoader
that must be used to load user code classes.public List<URL> getJobJarAndDependencies()
public static List<URL> getJobJarAndDependencies(File jarFile, @Nullable String entryPointClassName) throws ProgramInvocationException
ProgramInvocationException
public static List<File> extractContainedLibraries(URL jarFile) throws ProgramInvocationException
ProgramInvocationException
- Thrown, if the extraction process failed.public void close()
close
in interface AutoCloseable
public static PackagedProgram.Builder newBuilder()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.