开发者社区 > 大数据与机器学习 > 实时计算 Flink > 正文

flink任务遇到The application contains no execute() 问题

flink任务我把处理函数从KeyedProcessFunction改成KeyedCoProcessFunction,增加了某个从kafka的输入,为什么部署到环境中就爆出“org.apache.flink.client.deployment.application.ApplicationExecutionException: The application contains no execute() calls”这种错误?

java.util.concurrent.CompletionException: org.apache.flink.client.deployment.application.ApplicationExecutionException: The application contains no execute() calls.
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292) ~[?:1.8.0_402]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308) ~[?:1.8.0_402]
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:957) ~[?:1.8.0_402]
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940) ~[?:1.8.0_402]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488) ~[?:1.8.0_402]
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990) ~[?:1.8.0_402]
at org.apache.flink.client.deployment.application.ApplicationDispatcherBootstrap.runApplicationEntryPoint(ApplicationDispatcherBootstrap.java:385) ~[flink-dist-1.17.1-h3.xxx.jar:1.17.1-h3.xxx]
at org.apache.flink.client.deployment.application.ApplicationDispatcherBootstrap.lambda$runApplicationAsync$3(ApplicationDispatcherBootstrap.java:303) ~[flink-dist-1.17.1-h3.xxx.jar:1.17.1-h3.xxx]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_402]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_402]
at org.apache.flink.runtime.concurrent.akka.ActorSystemScheduledExecutorAdapter$ScheduledFutureTask.run(ActorSystemScheduledExecutorAdapter.java:171) ~[flink-rpc-akka_9c16cc6a-e7af-4810-9573-6a1dc248ae52.jar:1.17.1-h3.xxx]
at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:68) ~[flink-rpc-akka_9c16cc6a-e7af-4810-9573-6a1dc248ae52.jar:1.17.1-h3.xxx]
at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.lambda$withContextClassLoader$0(ClassLoadingUtils.java:41) ~[flink-rpc-akka_9c16cc6a-e7af-4810-9573-6a1dc248ae52.jar:1.17.1-h3.xxx]
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49) [flink-rpc-akka_9c16cc6a-e7af-4810-9573-6a1dc248ae52.jar:1.17.1-h3.xxx]
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48) [flink-rpc-akka_9c16cc6a-e7af-4810-9573-6a1dc248ae52.jar:1.17.1-h3.xxx]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_402]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_402]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_402]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) [?:1.8.0_402]
Caused by: org.apache.flink.client.deployment.application.ApplicationExecutionException: The application contains no execute() calls.
... 13 more

展开
收起
teawh 2024-05-17 15:48:03 312 0
1 条回答
写回答
取消 提交回答
  • 北京阿里云ACE会长

    检查执行入口:确保你的 Flink 应用程序有一个明确的执行入口,通常是通过调用 execute() 方法来启动。如果你使用了 KeyedCoProcessFunction,你需要确保你的程序正确地创建了 DataStream,并且调用了 execute() 方法。

    2024-05-18 10:03:41
    赞同 1 展开评论 打赏

实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。

相关产品

  • 实时计算 Flink版
  • 相关电子书

    更多
    Flink CDC Meetup PPT - 龚中强 立即下载
    Flink CDC Meetup PPT - 王赫 立即下载
    Flink CDC Meetup PPT - 覃立辉 立即下载