This file shows some commands that you can perform with the Flink Deployer.
- Deploy a new job
docker-compose run deployer deploy \
--file-name "/tmp/flink-stateful-wordcount-assembly-0.jar" \
--entry-class "WordCountStateful" \
--parallelism "2" \
--program-args "--intervalMs 1000"
- List running jobs
docker-compose run deployer list
- Upgrade a running job
docker-compose run deployer update \
--job-name-base "Windowed WordCount" \
--file-name "/tmp/flink-stateful-wordcount-assembly-0.jar" \
--entry-class "WordCountStateful" \
--parallelism "2" \
--program-args "--intervalMs 1000" \
--savepoint-dir "/data/flink"
- Start a job from a specific savepoint Ensure you've run steps 1 and 3. This will have created a savepoint. Find the location of that savepoint and put this in the placeholder below:
docker-compose run deployer deploy \
--file-name "/tmp/flink-stateful-wordcount-assembly-0.jar" \
--entry-class "WordCountStateful" \
--parallelism "2" \
--program-args "--intervalMs 1000" \
--savepoint-path "/data/flink/[SAVEPOINT_LOC_HERE]"
- Start a job from the latest savepoint in a specified savepoint directory
Ensure you've run steps 1 and 3. This will have created a savepoint.
docker-compose run deployer deploy \
--file-name "/tmp/flink-stateful-wordcount-assembly-0.jar" \
--entry-class "WordCountStateful" \
--parallelism "2" \
--program-args "--intervalMs 1000" \
--savepoint-dir "/data/flink"