Skip to content

Latest commit

 

History

History
56 lines (44 loc) · 1.55 KB

example-commands.md

File metadata and controls

56 lines (44 loc) · 1.55 KB

Example Commands

This file shows some commands that you can perform with the Flink Deployer.

  1. 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"
  1. List running jobs
docker-compose run deployer list
  1. 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"
  1. 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]"
  1. 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"