简体   繁体   中英

Flink: How to restart Flink taskmanager on windows?

My goal is to kill Flink task manager and then restart it on Windows. This is needed to stimulate error in Flink so that I can see checkpoint work. I have managed to find the task manager PID by looking up the PID against the port it listens to. So killing that PID should kill taskmanager but I am unable to find a way to restart Flink taskmanager on windows because the taskmanager script is a shell script. Please help me in below two queries.

  1. How to restart Flink taskmanager on windows? Do we need to install cygwin and use it. Will it work? If cygwin works please provide steps to proceed to restart taskmanager.
  2. Is there a more elegant way to know the taskmanager PID on windows?
  1. If task manager is down on windows and Job manager is running then one can start task manager simply by executing %FLINK_HOME%\\bin\\start-cluster.bat. It will just restart the taskmanager.

  2. When start-cluster.bat is executed it opens two terminals(cmd windows) running two Java processes. The second window belongs to taskmanager so by doing ctrl+c on that window one can kill taskmanager. Also the first window belongs to Jobmanager.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM