请问 flink 1.11 版本下 用于提交用户任务的方法
org.apache.flink.client.ClientUtils.submitJob(ClusterClient, JobGraph)方法在 flink 1.12版本下找不到了,
现在用哪个方法取代了呢?又该如何获取提交任务后的jobId呢?谢谢!
| publicstaticJobExecutionResultsubmitJob( |
| | ClusterClient<?>client, |
| | JobGraphjobGraph) throwsProgramInvocationException { |
| | checkNotNull(client); |
| | checkNotNull(jobGraph); |
| | try { |
| | return client |
| | .submitJob(jobGraph) |
| | .thenApply(DetachedJobExecutionResult::new) |
| | .get(); |
| | } catch (InterruptedException|ExecutionException e) { |
| | ExceptionUtils.checkInterrupted(e); |
| | thrownewProgramInvocationException("Could not run job in detached mode.", jobGraph.getJobID(), e); |
| | } |
| | } |
https://github.com/apache/flink/blob/release-1.11/flink-clients/src/main/java/org/apache/flink/client/ClientUtils.java#L77https://github.com/apache/flink/blob/release-1.12/flink-clients/src/main/java/org/apache/flink/client/ClientUtils.java