AHeise commented on a change in pull request #18105: URL: https://github.com/apache/flink/pull/18105#discussion_r771176056
########## File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/container/FlinkContainers.java ########## @@ -254,6 +259,55 @@ public void submitSQLJob(SQLJobSubmission job) throws IOException, InterruptedEx } } + /** + * Submits the given job to the cluster. + * + * @param job job to submit + */ + public JobID submitJob(JobSubmission job) throws IOException, InterruptedException { + final List<String> commands = new ArrayList<>(); + commands.add("flink/bin/flink"); + commands.add("run"); + + if (job.isDetached()) { + commands.add("-d"); + } + if (job.getParallelism() > 0) { + commands.add("-p"); + commands.add(String.valueOf(job.getParallelism())); + } + job.getMainClass() + .ifPresent( + mainClass -> { + commands.add("--class"); + commands.add(mainClass); + }); + final Path jobJar = job.getJar(); + final String containerPath = "/tmp/" + jobJar.getFileName(); + commands.add(containerPath); + jobManager.copyFileToContainer( + MountableFile.forHostPath(jobJar.toAbsolutePath()), containerPath); Review comment: Does this work with resubmissions? ########## File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/container/FlinkContainers.java ########## @@ -254,6 +259,55 @@ public void submitSQLJob(SQLJobSubmission job) throws IOException, InterruptedEx } } + /** + * Submits the given job to the cluster. + * + * @param job job to submit + */ + public JobID submitJob(JobSubmission job) throws IOException, InterruptedException { Review comment: `submitJobWithCLI`? I could imagine that someone wants to specificially test different entry points. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org