Class FromJarEntryClassInformationProvider
- java.lang.Object
-
- org.apache.flink.client.deployment.application.FromJarEntryClassInformationProvider
-
- All Implemented Interfaces:
EntryClassInformationProvider
public class FromJarEntryClassInformationProvider extends Object implements EntryClassInformationProvider
FromJarEntryClassInformationProvideris used for cases where the Jar archive is explicitly specified.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FromJarEntryClassInformationProvidercreateFromCustomJar(File jarFile, String jobClassName)Creates aFromJarEntryClassInformationProviderfor a custom Jar archive.static FromJarEntryClassInformationProvidercreateFromPythonJar()Creates aFromJarEntryClassInformationProviderfor a job implemented in Python.Optional<File>getJarFile()Returns the specifiedjarFile.Optional<String>getJobClassName()Returns the specified job class name that is either available in the correspondingjarFile.
-
-
-
Method Detail
-
createFromCustomJar
public static FromJarEntryClassInformationProvider createFromCustomJar(File jarFile, @Nullable String jobClassName)
Creates aFromJarEntryClassInformationProviderfor a custom Jar archive. At least thejarFileor thejobClassNamehas to be set.- Parameters:
jarFile- The Jar archive.jobClassName- The name of the job class.- Returns:
- The
FromJarEntryClassInformationProviderreferring to the passed information.
-
createFromPythonJar
public static FromJarEntryClassInformationProvider createFromPythonJar()
Creates aFromJarEntryClassInformationProviderfor a job implemented in Python.- Returns:
- A
FromJarEntryClassInformationProviderfor a job implemented in Python
-
getJarFile
public Optional<File> getJarFile()
Returns the specifiedjarFile.- Specified by:
getJarFilein interfaceEntryClassInformationProvider- Returns:
- The specified
jarFile. - See Also:
getJobClassName()
-
getJobClassName
public Optional<String> getJobClassName()
Returns the specified job class name that is either available in the correspondingjarFile. It can return an emptyOptionalif the job class is the entry class of the jar.- Specified by:
getJobClassNamein interfaceEntryClassInformationProvider- Returns:
- Returns the job class that can be found in the respective
jarFile. It can also return an emptyOptionaldespite if the job class is the entry class of the jar. - See Also:
getJarFile()
-
-