You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Niklas Semmler (Jira)" <ji...@apache.org> on 2022/02/28 15:17:00 UTC
[jira] [Created] (FLINK-26400) Release Testing: Explicit shutdown signalling from TaskManager to JobManager
Niklas Semmler created FLINK-26400:
--------------------------------------
Summary: Release Testing: Explicit shutdown signalling from TaskManager to JobManager
Key: FLINK-26400
URL: https://issues.apache.org/jira/browse/FLINK-26400
Project: Flink
Issue Type: Improvement
Components: Runtime / Coordination
Affects Versions: 1.15.0
Reporter: Niklas Semmler
Fix For: 1.15.0
FLINK-25277 introduces explicit signalling between a TaskManager and the JobManager when the TaskManager shuts down. This reduces the time it takes for a reactive cluster to down-scale & restart.
*Setup*
1. Checkout master and install Flink
{{mvn clean install -Dfast -DskipTests -Dnpm.skip -Dskip.npm}}
2. Go to the build target folder
{{cd build-target }}
3. Add the following line to your flink config to enable reactive mode:
{{taskmanager.host: localhost # a workaround}}
{{scheduler-mode: reactive}}
{{restart-strategy: fixeddelay}}
{{restart-strategy.fixed-delay.attempts: 100}}
4. Create a “usrlib” folder and place the TopSpeedWindowing jar into it
{{mkdir usrlib}}
{{cp ../../../../flink-examples/flink-examples-streaming/target/flink-examples-streaming_2.12-1.15-SNAPSHOT-TopSpeedWindowing.jar usrlib/}}
5. Start the job
{{bin/standalone-job.sh start --main-class org.apache.flink.streaming.examples.windowing.TopSpeedWindowing}}
6. Start three task managers
{{bin/taskmanager.sh start}}
{{bin/taskmanager.sh start}}
{{bin/taskmanager.sh start}}
7. Wait for the job to stabilize. The log file should show that three tasks start for every operator.
{{GlobalWindows -> Sink: Print to Std. Out (3/3) (d10339d5755d07f3d9864ed1b2147af2) switched from INITIALIZING to RUNNING.}}
*Test*
Stop one taskmanager
{{bin/taskmanager.sh stop}}
Success condition: You should see that the job cancels and re-runs after a few seconds. In the logs you should find a line with the text “The TaskExecutor is shutting down”.
*Teardown*
Stop all taskmanagers and the jobmanager:
{{bin/standalone-job.sh stop}}
{{bin/taskmanager.sh stop-all}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)