You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2021/05/18 09:17:46 UTC

[flink-docker] branch dev-master updated: [FLINK-22648] Only set number of slots if env variable is set

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

chesnay pushed a commit to branch dev-master
in repository https://gitbox.apache.org/repos/asf/flink-docker.git


The following commit(s) were added to refs/heads/dev-master by this push:
     new 4ae94a1  [FLINK-22648] Only set number of slots if env variable is set
4ae94a1 is described below

commit 4ae94a1eaf349087ca97742f9917426d5bbd8ae7
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Wed May 12 14:41:35 2021 +0200

    [FLINK-22648] Only set number of slots if env variable is set
---
 docker-entrypoint.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index f815838..84fca0c 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -79,8 +79,9 @@ prepare_configuration() {
     set_config_option blob.server.port 6124
     set_config_option query.server.port 6125
 
-    TASK_MANAGER_NUMBER_OF_TASK_SLOTS=${TASK_MANAGER_NUMBER_OF_TASK_SLOTS:-1}
-    set_config_option taskmanager.numberOfTaskSlots ${TASK_MANAGER_NUMBER_OF_TASK_SLOTS}
+    if [ -n "${TASK_MANAGER_NUMBER_OF_TASK_SLOTS}" ]; then
+        set_config_option taskmanager.numberOfTaskSlots ${TASK_MANAGER_NUMBER_OF_TASK_SLOTS}
+    fi
 
     if [ -n "${FLINK_PROPERTIES}" ]; then
         echo "${FLINK_PROPERTIES}" >> "${CONF_FILE}"