Class FromJarEntryClassInformationProvider

java.lang.Object
org.apache.flink.client.deployment.application.FromJarEntryClassInformationProvider
All Implemented Interfaces:
EntryClassInformationProvider

public class FromJarEntryClassInformationProvider extends Object implements EntryClassInformationProvider
FromJarEntryClassInformationProvider is used for cases where the Jar archive is explicitly specified.
  • Method Details

    • createFromCustomJar

      public static FromJarEntryClassInformationProvider createFromCustomJar(File jarFile, @Nullable String jobClassName)
      Creates a FromJarEntryClassInformationProvider for a custom Jar archive. At least the jarFile or the jobClassName has to be set.
      Parameters:
      jarFile - The Jar archive.
      jobClassName - The name of the job class.
      Returns:
      The FromJarEntryClassInformationProvider referring to the passed information.
    • createFromPythonJar

      public static FromJarEntryClassInformationProvider createFromPythonJar()
      Creates a FromJarEntryClassInformationProvider for a job implemented in Python.
      Returns:
      A FromJarEntryClassInformationProvider for a job implemented in Python
    • getJarFile

      public Optional<File> getJarFile()
      Returns the specified jarFile.
      Specified by:
      getJarFile in interface EntryClassInformationProvider
      Returns:
      The specified jarFile.
      See Also:
    • getJobClassName

      public Optional<String> getJobClassName()
      Returns the specified job class name that is either available in the corresponding jarFile. It can return an empty Optional if the job class is the entry class of the jar.
      Specified by:
      getJobClassName in interface EntryClassInformationProvider
      Returns:
      Returns the job class that can be found in the respective jarFile. It can also return an empty Optional despite if the job class is the entry class of the jar.
      See Also: