Apache Flink 的分离模式是什么? [英] What is Apache Flink's detached mode?

查看:33
本文介绍了Apache Flink 的分离模式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Flink 文档 但无法弄清楚分离模式"是什么意思.请帮忙.谢谢.

I saw this line in Flink documentation but can't figure out what 'detached mode' means. Please help. Thanks.

在分离模式下运行示例程序:

Run example program in detached mode:

./bin/flink run -d ./examples/batch/WordCount.jar

推荐答案

Flink CLI 以阻塞或分离模式运行作业.在阻塞模式下,CliFrontend(客户端)进程保持运行、阻塞、等待作业完成——之后它会打印出一些信息.在下面的示例中,我运行了一个流作业,几秒钟后我从 WebUI 取消了该作业:

The Flink CLI runs jobs either in blocking or detached mode. In blocking mode, the CliFrontend (client) process keeps running, blocked, waiting for the job to complete -- after which it will print out some information. In the example below I ran a streaming job, which I cancelled from the WebUI after a few seconds:

$ flink run target/oscon-1.0-SNAPSHOT.jar 
Starting execution of program
Program execution finished
Job with JobID b02da01c30585bfbc86a23446559987f has finished.
Job Runtime: 8673 ms

如果您在阻塞模式下运行,您可以根据需要杀死 CliFrontend(例如,使用 ctrl-C),并且作业不会受到影响,只要它运行的距离足以将作业提交到集群.

If you run in blocking mode, you can kill the CliFrontend (e.g., with ctrl-C) if you like, and the job will be unaffected, so long as it has run far enough to have submitted the job to the cluster.

在分离模式下,CliFrontend 将作业提交到集群,然后立即退出.

In detached mode, the CliFrontend submits the job to the cluster and then exits straight away.

这篇关于Apache Flink 的分离模式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆