Package org.apache.flink.client.cli
Class CliFrontendParser
- java.lang.Object
-
- org.apache.flink.client.cli.CliFrontendParser
-
public class CliFrontendParser extends Object
A simple command line parser (based on Apache Commons CLI) that extracts command line options.
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.cli.Option
ADDRESS_OPTION
static org.apache.commons.cli.Option
ARGS_OPTION
static org.apache.commons.cli.Option
DETACHED_OPTION
static org.apache.commons.cli.Option
PARALLELISM_OPTION
static org.apache.commons.cli.Option
PY_OPTION
static org.apache.commons.cli.Option
PYARCHIVE_OPTION
static org.apache.commons.cli.Option
PYCLIENTEXEC_OPTION
static org.apache.commons.cli.Option
PYEXEC_OPTION
static org.apache.commons.cli.Option
PYFILES_OPTION
static org.apache.commons.cli.Option
PYMODULE_OPTION
static org.apache.commons.cli.Option
PYREQUIREMENTS_OPTION
static org.apache.commons.cli.Option
PYTHON_PATH
static org.apache.commons.cli.Option
SAVEPOINT_ALLOW_NON_RESTORED_OPTION
static org.apache.commons.cli.Option
SAVEPOINT_CLAIM_MODE
static org.apache.commons.cli.Option
SAVEPOINT_PATH_OPTION
static org.apache.commons.cli.Option
SAVEPOINT_RESTORE_MODE
Deprecated.static org.apache.commons.cli.Option
SHUTDOWN_IF_ATTACHED_OPTION
static org.apache.commons.cli.Option
STOP_AND_DRAIN
static org.apache.commons.cli.Option
STOP_WITH_SAVEPOINT_PATH
-
Constructor Summary
Constructors Constructor Description CliFrontendParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SavepointRestoreSettings
createSavepointRestoreSettings(org.apache.commons.cli.CommandLine commandLine)
static org.apache.commons.cli.Options
getRunCommandOptions()
static org.apache.commons.cli.Options
mergeOptions(org.apache.commons.cli.Options optionsA, org.apache.commons.cli.Options optionsB)
Merges the givenOptions
into a new Options object.static org.apache.commons.cli.CommandLine
parse(org.apache.commons.cli.Options options, String[] args, boolean stopAtNonOptions)
static void
printHelp(Collection<CustomCommandLine> customCommandLines)
Prints the help for the client.static void
printHelpForCancel(Collection<CustomCommandLine> customCommandLines)
static void
printHelpForCheckpoint(Collection<CustomCommandLine> customCommandLines)
static void
printHelpForInfo()
static void
printHelpForList(Collection<CustomCommandLine> customCommandLines)
static void
printHelpForRun(Collection<CustomCommandLine> customCommandLines)
static void
printHelpForSavepoint(Collection<CustomCommandLine> customCommandLines)
static void
printHelpForStop(Collection<CustomCommandLine> customCommandLines)
-
-
-
Field Detail
-
PARALLELISM_OPTION
public static final org.apache.commons.cli.Option PARALLELISM_OPTION
-
DETACHED_OPTION
public static final org.apache.commons.cli.Option DETACHED_OPTION
-
SHUTDOWN_IF_ATTACHED_OPTION
public static final org.apache.commons.cli.Option SHUTDOWN_IF_ATTACHED_OPTION
-
ARGS_OPTION
public static final org.apache.commons.cli.Option ARGS_OPTION
-
ADDRESS_OPTION
public static final org.apache.commons.cli.Option ADDRESS_OPTION
-
SAVEPOINT_PATH_OPTION
public static final org.apache.commons.cli.Option SAVEPOINT_PATH_OPTION
-
SAVEPOINT_ALLOW_NON_RESTORED_OPTION
public static final org.apache.commons.cli.Option SAVEPOINT_ALLOW_NON_RESTORED_OPTION
-
SAVEPOINT_CLAIM_MODE
public static final org.apache.commons.cli.Option SAVEPOINT_CLAIM_MODE
-
SAVEPOINT_RESTORE_MODE
@Deprecated public static final org.apache.commons.cli.Option SAVEPOINT_RESTORE_MODE
Deprecated.
-
STOP_WITH_SAVEPOINT_PATH
public static final org.apache.commons.cli.Option STOP_WITH_SAVEPOINT_PATH
-
STOP_AND_DRAIN
public static final org.apache.commons.cli.Option STOP_AND_DRAIN
-
PY_OPTION
public static final org.apache.commons.cli.Option PY_OPTION
-
PYFILES_OPTION
public static final org.apache.commons.cli.Option PYFILES_OPTION
-
PYMODULE_OPTION
public static final org.apache.commons.cli.Option PYMODULE_OPTION
-
PYREQUIREMENTS_OPTION
public static final org.apache.commons.cli.Option PYREQUIREMENTS_OPTION
-
PYARCHIVE_OPTION
public static final org.apache.commons.cli.Option PYARCHIVE_OPTION
-
PYEXEC_OPTION
public static final org.apache.commons.cli.Option PYEXEC_OPTION
-
PYCLIENTEXEC_OPTION
public static final org.apache.commons.cli.Option PYCLIENTEXEC_OPTION
-
PYTHON_PATH
public static final org.apache.commons.cli.Option PYTHON_PATH
-
-
Method Detail
-
getRunCommandOptions
public static org.apache.commons.cli.Options getRunCommandOptions()
-
printHelp
public static void printHelp(Collection<CustomCommandLine> customCommandLines)
Prints the help for the client.
-
printHelpForRun
public static void printHelpForRun(Collection<CustomCommandLine> customCommandLines)
-
printHelpForInfo
public static void printHelpForInfo()
-
printHelpForList
public static void printHelpForList(Collection<CustomCommandLine> customCommandLines)
-
printHelpForStop
public static void printHelpForStop(Collection<CustomCommandLine> customCommandLines)
-
printHelpForCancel
public static void printHelpForCancel(Collection<CustomCommandLine> customCommandLines)
-
printHelpForSavepoint
public static void printHelpForSavepoint(Collection<CustomCommandLine> customCommandLines)
-
printHelpForCheckpoint
public static void printHelpForCheckpoint(Collection<CustomCommandLine> customCommandLines)
-
createSavepointRestoreSettings
public static SavepointRestoreSettings createSavepointRestoreSettings(org.apache.commons.cli.CommandLine commandLine)
-
parse
public static org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] args, boolean stopAtNonOptions) throws CliArgsException
- Throws:
CliArgsException
-
mergeOptions
public static org.apache.commons.cli.Options mergeOptions(@Nullable org.apache.commons.cli.Options optionsA, @Nullable org.apache.commons.cli.Options optionsB)
Merges the givenOptions
into a new Options object.- Parameters:
optionsA
- options to merge, can be null if noneoptionsB
- options to merge, can be null if none- Returns:
-
-