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.
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.
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.