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

查看:130
本文介绍了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天全站免登陆