Class DefaultPackagedProgramRetriever

java.lang.Object
org.apache.flink.client.program.DefaultPackagedProgramRetriever
All Implemented Interfaces:
PackagedProgramRetriever

public class DefaultPackagedProgramRetriever extends Object implements PackagedProgramRetriever
PackageProgramRetrieverImpl is the default implementation of PackagedProgramRetriever that can either retrieve a PackagedProgram from a specific jar, some provided user classpath or the system classpath.
  • Method Details

    • create

      public static DefaultPackagedProgramRetriever create(@Nullable File userLibDir, @Nullable String jobClassName, String[] programArgs, org.apache.flink.configuration.Configuration configuration) throws org.apache.flink.util.FlinkException
      Throws:
      org.apache.flink.util.FlinkException
    • create

      public static DefaultPackagedProgramRetriever create(@Nullable File userLibDir, @Nullable File jarFile, @Nullable String jobClassName, String[] programArgs, org.apache.flink.configuration.Configuration configuration) throws org.apache.flink.util.FlinkException
      Throws:
      org.apache.flink.util.FlinkException
    • create

      public static DefaultPackagedProgramRetriever create(@Nullable File userLibDir, @Nullable File jarFile, @Nullable Collection<File> userArtifacts, @Nullable String jobClassName, String[] programArgs, org.apache.flink.configuration.Configuration configuration) throws org.apache.flink.util.FlinkException
      Creates a PackageProgramRetrieverImpl with the given parameters.
      Parameters:
      userLibDir - The user library directory that is used for generating the user classpath if specified. The system classpath is used if not specified.
      jarFile - The jar archive expected to contain the job class included; null if the job class is on the system classpath.
      userArtifacts - The user artifacts that should be added to the user classpath if specified.
      jobClassName - The job class to use; if null the user classpath (or, if not set, the system classpath) will be scanned for possible main class.
      programArgs - The program arguments.
      configuration - The Flink configuration for the given job.
      Returns:
      The PackageProgramRetrieverImpl that can be used to create a PackagedProgram instance.
      Throws:
      org.apache.flink.util.FlinkException - If something goes wrong during instantiation.
    • getPackagedProgram

      public PackagedProgram getPackagedProgram() throws org.apache.flink.util.FlinkException
      Description copied from interface: PackagedProgramRetriever
      Retrieve the PackagedProgram.
      Specified by:
      getPackagedProgram in interface PackagedProgramRetriever
      Returns:
      the retrieved PackagedProgram.
      Throws:
      org.apache.flink.util.FlinkException - if the PackagedProgram could not be retrieved