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

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

commit 749641033bda7ad6e7cd39041a0ea86b2f6e822c
Author: Chesnay Schepler <[email protected]>
AuthorDate: Wed Jan 20 00:50:28 2021 +0100

    [FLINK-21035] Deduplicate 'copy_plugins_if_required' calls
---
 docker-entrypoint.sh | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index a982a33..d8c575b 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -84,7 +84,6 @@ set_common_options() {
 
 prepare_job_manager_start() {
     echo "Starting Job Manager"
-    copy_plugins_if_required
 
     set_common_options
 
@@ -102,6 +101,8 @@ maybe_enable_jemalloc() {
 
 maybe_enable_jemalloc
 
+copy_plugins_if_required
+
 args=("$@")
 if [ "$1" = "help" ]; then
     printf "Usage: $(basename "$0") 
(jobmanager|${COMMAND_STANDALONE}|taskmanager|${COMMAND_HISTORY_SERVER})\n"
@@ -124,7 +125,6 @@ elif [ "$1" = ${COMMAND_HISTORY_SERVER} ]; then
     args=("${args[@]:1}")
 
     echo "Starting History Server"
-    copy_plugins_if_required
 
     if [ -n "${FLINK_PROPERTIES}" ]; then
         echo "${FLINK_PROPERTIES}" >> "${CONF_FILE}"
@@ -136,7 +136,6 @@ elif [ "$1" = "taskmanager" ]; then
     args=("${args[@]:1}")
 
     echo "Starting Task Manager"
-    copy_plugins_if_required
 
     
TASK_MANAGER_NUMBER_OF_TASK_SLOTS=${TASK_MANAGER_NUMBER_OF_TASK_SLOTS:-$(grep 
-c ^processor /proc/cpuinfo)}
 
@@ -152,8 +151,6 @@ elif [ "$1" = "taskmanager" ]; then
 elif [ "$1" = "$COMMAND_NATIVE_KUBERNETES" ]; then
     args=("${args[@]:1}")
 
-    copy_plugins_if_required
-
     export _FLINK_HOME_DETERMINED=true
     . $FLINK_HOME/bin/config.sh
     export 
FLINK_CLASSPATH="`constructFlinkClassPath`:$INTERNAL_HADOOP_CLASSPATHS"
@@ -164,8 +161,6 @@ fi
 
 args=("${args[@]}")
 
-copy_plugins_if_required
-
 # Set the Flink related environments
 export _FLINK_HOME_DETERMINED=true
 . $FLINK_HOME/bin/config.sh

Reply via email to