Package org.apache.flink.client.program
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 forPackagedProgramrelated operations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.flink.runtime.jobgraph.JobGraphcreateJobGraph(PackagedProgram packagedProgram, org.apache.flink.configuration.Configuration configuration, int defaultParallelism, boolean suppressOutput)static org.apache.flink.runtime.jobgraph.JobGraphcreateJobGraph(PackagedProgram packagedProgram, org.apache.flink.configuration.Configuration configuration, int defaultParallelism, org.apache.flink.api.common.JobID jobID, boolean suppressOutput)static org.apache.flink.api.dag.PipelinegetPipelineFromProgram(PackagedProgram program, org.apache.flink.configuration.Configuration configuration, int parallelism, boolean suppressOutput)static StringgetPythonDriverClassName()static URLgetPythonJar()static URLgetSqlGatewayJar()static BooleanisPython(String entryPointClassName)static booleanisPython(String[] programArguments)static booleanisSqlApplication(String entryPointClassName)static URIresolveURI(String path)static booleanusingSystemClassPath(org.apache.flink.configuration.Configuration configuration)static PackagedProgramUtilsvalueOf(String name)Returns the enum constant of this type with the specified name.static PackagedProgramUtils[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static PackagedProgramUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PackagedProgramUtils c : PackagedProgramUtils.values()) System.out.println(c);
- 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 nameNullPointerException- 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
- Parameters:
packagedProgram- to extract the JobGraph fromconfiguration- to use for the optimizer and job graph generatordefaultParallelism- for the JobGraphjobID- 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
- Parameters:
packagedProgram- to extract the JobGraph fromconfiguration- to use for the optimizer and job graph generatordefaultParallelism- for the JobGraphsuppressOutput- 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[] 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
-
usingSystemClassPath
public static boolean usingSystemClassPath(org.apache.flink.configuration.Configuration configuration)
-
-