This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b5d7787fec5aa09fc9d132e5617243cd6c212807
Author: Till Rohrmann <trohrm...@apache.org>
AuthorDate: Thu Aug 16 19:49:03 2018 +0200

    [hotfix] Add support for savepoint options to docker-compose template
---
 flink-container/docker/README.md          | 6 ++++++
 flink-container/docker/docker-compose.yml | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/flink-container/docker/README.md b/flink-container/docker/README.md
index 7d3c030..3ff70c6 100644
--- a/flink-container/docker/README.md
+++ b/flink-container/docker/README.md
@@ -39,6 +39,7 @@ The `docker-compose.yml` contains the following parameters:
 * `FLINK_JOB` - Name of the Flink job to execute (default: none)
 * `DEFAULT_PARALLELISM` - Default parallelism with which to start the job 
(default: 1)
 * `FLINK_JOB_ARGUMENTS` - Additional arguments which will be passed to the job 
cluster (default: none)
+* `SAVEPOINT_OPTIONS` - Savepoint options to start the cluster with (default: 
none)
 
 The parameters can be set by exporting the corresponding environment variable.
 
@@ -55,6 +56,11 @@ This will automatically start `DEFAULT_PARALLELISM` 
TaskManagers:
         
         FLINK_DOCKER_IMAGE_NAME=<IMAGE_NAME> FLINK_JOB=<JOB_NAME> 
DEFAULT_PARALLELISM=<DEFAULT_PARALLELISM> docker-compose up
         
+In order to resume the job from a savepoint set `SAVEPOINT_OPTIONS`.
+Supported options are `--fromSavepoint <SAVEPOINT_PATH>` and 
`--allowNonRestoredState` where `<SAVEPOINT_PATH>` is accessible from all 
containers.
+
+        FLINK_DOCKER_IMAGE_NAME=<IMAGE_NAME> FLINK_JOB=<JOB_NAME> 
SAVEPOINT_OPTIONS="--fromSavepoint <SAVEPOINT_PATH> --allowNonRestoredState" 
docker-compose up 
+        
 One can also provide additional job arguments via `FLINK_JOB_ARGUMENTS` which 
are passed to the job:
         
         FLINK_DOCKER_IMAGE_NAME=<IMAGE_NAME> FLINK_JOB=<JOB_NAME> 
FLINK_JOB_ARGUMENTS=<JOB_ARGUMENTS> docker-compose up
diff --git a/flink-container/docker/docker-compose.yml 
b/flink-container/docker/docker-compose.yml
index 28b5368..a5e9b49 100644
--- a/flink-container/docker/docker-compose.yml
+++ b/flink-container/docker/docker-compose.yml
@@ -23,6 +23,7 @@
 # * FLINK_JOB - Name of the Flink job to execute (default: none)
 # * DEFAULT_PARALLELISM - Default parallelism with which to start the job 
(default: 1)
 # * FLINK_JOB_ARGUMENTS - Additional arguments which will be passed to the job 
cluster (default: none)
+# * SAVEPOINT_OPTIONS - Savepoint options to start the cluster with (default: 
none)
 
 version: "2.2"
 services:
@@ -30,7 +31,7 @@ services:
     image: ${FLINK_DOCKER_IMAGE_NAME:-flink-job}
     ports:
       - "8081:8081"
-    command: job-cluster --job-classname ${FLINK_JOB} 
-Djobmanager.rpc.address=job-cluster 
-Dparallelism.default=${DEFAULT_PARALLELISM:-1} ${FLINK_JOB_ARGUMENTS}
+    command: job-cluster --job-classname ${FLINK_JOB} 
-Djobmanager.rpc.address=job-cluster 
-Dparallelism.default=${DEFAULT_PARALLELISM:-1} ${SAVEPOINT_OPTIONS} 
${FLINK_JOB_ARGUMENTS}
 
   taskmanager:
     image: ${FLINK_DOCKER_IMAGE_NAME:-flink-job}

Reply via email to