为什么stop-cluster.sh停止最新启动的Flink集群? [英] why the stop-cluster.sh stop the latest started Flink cluster?

查看:128
本文介绍了为什么stop-cluster.sh停止最新启动的Flink集群?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划从Flink 1.5.2升级到1.6.0,然后进行作业迁移.为了最小化作业的暂停时间,我计划同时运行两个Flink群集,在成功迁移作业之后,我将停止旧的群集.但是,当我尝试通过在目录Flink1.5.2/bin中运行stop-cluster.sh来停止Flink群集时,发现停止的群集是Flink 1.6.0,而不是预期的Flink 1.5.2.

I'm plan to do an upgrading from Flink 1.5.2 to 1.6.0, and then do the jobs migration. In order to minimum the pause time for the jobs, I plan to run both Flink clusters at the same time, after migrating jobs successfully, I would stop the old one. However when I tried to stop the Flink cluster by running stop-cluster.sh in the directory Flink1.5.2/bin , I found the stopped cluster is Flink 1.6.0 instead of the expected Flink 1.5.2 .

我做了一些测试,发现stop-cluster.sh只是停止了最新启动的Flink集群,也就是说,如果先启动集群1.6.0,然后再启动Flink 1.5.2,然后再运行stop-cluster.sh,它将首先停止Flink 1.5.2,即使您在集群1.6.0目录Flink1.6.0/bin上运行stop-cluster.sh也是如此.根据我的理解,在Flink1.6.0/bin上运行stop-cluster.sh时,应停止集群1.6.0,而在Flink1.5.2/bin上运行stop-cluster.sh时应停止集群1.5.2.,但是没有.

I did some test and found the stop-cluster.sh just stop the latest started Flink cluster, that is to say, if you start cluster 1.6.0 firstly, then starts Flink 1.5.2, after that when you run stop-cluster.sh, it would stop Flink 1.5.2 firstly even you run the stop-cluster.sh at the cluster 1.6.0 directory Flink1.6.0/bin. Based on my understanding, when running the stop-cluster.sh at the Flink1.6.0/bin it should stop cluster 1.6.0, and stop the cluster 1.5.2 when running the stop-cluster.sh at the Flink1.5.2/bin , however it didn't.

我做了一些研究,发现stop-cluster.sh将基于包含pid的文件杀死该进程,但是我不知道该文件的位置,并且我怀疑两个集群都写了pid在它们启动时的相同位置,使stop-cluster.sh变得混乱.

I did some research and found the stop-cluster.sh would kill the process based on the file which contains the pid , however I don't know the location of that file, and I suspect both of the clusters write the pid in the same places when they started, which make the stop-cluster.sh chaotic.

请告知如何停止指定的群集.

Please advise how to stop the specified cluster.

推荐答案

默认情况下,pid文件被写入/tmp ,并且名称为 flink-< USER>-<; FLINK_COMPONENT> .pid .您可以通过在 flink-conf.yaml 中设置 env.pid.dir 配置来控制目录.通过使用不同的pid文件目录,您可以控制不同的群集.

Per default, the pid file is written to /tmp and has the name flink-<USER>-<FLINK_COMPONENT>.pid. You can control the directory by setting the env.pid.dir configuration in flink-conf.yaml. By using different pid file directory you can keep control over the different clusters.

这篇关于为什么stop-cluster.sh停止最新启动的Flink集群?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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