Enum PackagedProgramUtils

java.lang.Object
java.lang.Enum<PackagedProgramUtils>
org.apache.flink.client.program.PackagedProgramUtils
All Implemented Interfaces:
Serializable, Comparable<PackagedProgramUtils>

public enum PackagedProgramUtils extends Enum<PackagedProgramUtils>
Utility class for PackagedProgram related operations.
  • Method Details

    • values

      public static PackagedProgramUtils[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PackagedProgramUtils valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • createJobGraph

      public static org.apache.flink.runtime.jobgraph.JobGraph createJobGraph(PackagedProgram packagedProgram, org.apache.flink.configuration.Configuration configuration, int defaultParallelism, @Nullable org.apache.flink.api.common.JobID jobID, boolean suppressOutput) throws ProgramInvocationException
      Creates a JobGraph with a specified JobID from the given PackagedProgram.
      Parameters:
      packagedProgram - to extract the JobGraph from
      configuration - to use for the optimizer and job graph generator
      defaultParallelism - for the JobGraph
      jobID - the pre-generated job id
      Returns:
      JobGraph extracted from the PackagedProgram
      Throws:
      ProgramInvocationException - if the JobGraph generation failed
    • createJobGraph

      public static org.apache.flink.runtime.jobgraph.JobGraph createJobGraph(PackagedProgram packagedProgram, org.apache.flink.configuration.Configuration configuration, int defaultParallelism, boolean suppressOutput) throws ProgramInvocationException
      Creates a JobGraph with a random JobID from the given PackagedProgram.
      Parameters:
      packagedProgram - to extract the JobGraph from
      configuration - to use for the optimizer and job graph generator
      defaultParallelism - for the JobGraph
      suppressOutput - Whether to suppress stdout/stderr during interactive JobGraph creation.
      Returns:
      JobGraph extracted from the PackagedProgram
      Throws:
      ProgramInvocationException - if the JobGraph generation failed
    • getPipelineFromProgram

      public static org.apache.flink.api.dag.Pipeline getPipelineFromProgram(PackagedProgram program, org.apache.flink.configuration.Configuration configuration, int parallelism, boolean suppressOutput) throws ProgramInvocationException
      Throws:
      ProgramInvocationException
    • isPython

      public static Boolean isPython(String entryPointClassName)
    • isPython

      public static boolean isPython(String[] programArguments)
    • getPythonJar

      public static URL getPythonJar()
    • getPythonDriverClassName

      public static String getPythonDriverClassName()
    • isSqlApplication

      public static boolean isSqlApplication(String entryPointClassName)
    • getSqlGatewayJar

      public static URL getSqlGatewayJar()
    • resolveURI

      public static URI resolveURI(String path) throws URISyntaxException
      Throws:
      URISyntaxException