Search in sources :

Example 1 with CliFrontend

use of org.apache.flink.client.cli.CliFrontend in project flink by apache.

the class FlinkYarnSessionCliTest method validateExecutorCLIisPrioritised.

private void validateExecutorCLIisPrioritised(Configuration configuration, String[] argsUnderTest) throws IOException, CliArgsException {
    final List<CustomCommandLine> customCommandLines = CliFrontend.loadCustomCommandLines(configuration, tmp.newFile().getAbsolutePath());
    final CliFrontend cli = new CliFrontend(configuration, customCommandLines);
    final CommandLine commandLine = cli.getCommandLine(CliFrontendParser.getRunCommandOptions(), argsUnderTest, true);
    final CustomCommandLine customCommandLine = cli.validateAndGetActiveCommandLine(commandLine);
    assertTrue(customCommandLine instanceof GenericCLI);
}
Also used : CustomCommandLine(org.apache.flink.client.cli.CustomCommandLine) CustomCommandLine(org.apache.flink.client.cli.CustomCommandLine) CommandLine(org.apache.commons.cli.CommandLine) GenericCLI(org.apache.flink.client.cli.GenericCLI) CliFrontend(org.apache.flink.client.cli.CliFrontend)

Aggregations

CommandLine (org.apache.commons.cli.CommandLine)1 CliFrontend (org.apache.flink.client.cli.CliFrontend)1 CustomCommandLine (org.apache.flink.client.cli.CustomCommandLine)1 GenericCLI (org.apache.flink.client.cli.GenericCLI)1