Package org.apache.flink.client.cli
Enum ProgramOptionsUtils
- java.lang.Object
-
- java.lang.Enum<ProgramOptionsUtils>
-
- org.apache.flink.client.cli.ProgramOptionsUtils
-
- All Implemented Interfaces:
Serializable,Comparable<ProgramOptionsUtils>
public enum ProgramOptionsUtils extends Enum<ProgramOptionsUtils>
Utility class forProgramOptions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfigurePythonExecution(org.apache.flink.configuration.Configuration configuration, PackagedProgram packagedProgram)static booleancontainsPythonDependencyOptions(org.apache.commons.cli.CommandLine line)static ProgramOptionscreatePythonProgramOptions(org.apache.commons.cli.CommandLine line)static booleanisPythonEntryPoint(org.apache.commons.cli.CommandLine line)static ProgramOptionsUtilsvalueOf(String name)Returns the enum constant of this type with the specified name.static ProgramOptionsUtils[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static ProgramOptionsUtils[] 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 (ProgramOptionsUtils c : ProgramOptionsUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProgramOptionsUtils 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
-
isPythonEntryPoint
public static boolean isPythonEntryPoint(org.apache.commons.cli.CommandLine line)
- Returns:
- True if the commandline contains "-py" or "-pym" options or comes from PyFlink shell, false otherwise.
-
containsPythonDependencyOptions
public static boolean containsPythonDependencyOptions(org.apache.commons.cli.CommandLine line)
- Returns:
- True if the commandline contains "-pyfs", "-pyarch", "-pyreq", "-pyexec", "-pypath" options, false otherwise.
-
createPythonProgramOptions
public static ProgramOptions createPythonProgramOptions(org.apache.commons.cli.CommandLine line) throws CliArgsException
- Throws:
CliArgsException
-
configurePythonExecution
public static void configurePythonExecution(org.apache.flink.configuration.Configuration configuration, PackagedProgram packagedProgram) throws Exception- Throws:
Exception
-
-