Search in sources :

Example 6 with CustomCommandLine

use of org.apache.flink.client.cli.CustomCommandLine 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

CustomCommandLine (org.apache.flink.client.cli.CustomCommandLine)6 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 URL (java.net.URL)2 CommandLine (org.apache.commons.cli.CommandLine)2 Options (org.apache.commons.cli.Options)2 CliArgsException (org.apache.flink.client.cli.CliArgsException)2 ProgramOptions (org.apache.flink.client.cli.ProgramOptions)2 Configuration (org.apache.flink.configuration.Configuration)2 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Stream (java.util.stream.Stream)1 InvalidProgramException (org.apache.flink.api.common.InvalidProgramException)1 CliFrontend (org.apache.flink.client.cli.CliFrontend)1 CliFrontendParser (org.apache.flink.client.cli.CliFrontendParser)1 ExecutionConfigAccessor (org.apache.flink.client.cli.ExecutionConfigAccessor)1 GenericCLI (org.apache.flink.client.cli.GenericCLI)1 ClusterClient (org.apache.flink.client.program.ClusterClient)1 ProgramInvocationException (org.apache.flink.client.program.ProgramInvocationException)1