tillrohrmann commented on a change in pull request #42:
URL: https://github.com/apache/flink-docker/pull/42#discussion_r521243135



##########
File path: 1.11/scala_2.11-java11-debian/docker-entrypoint.sh
##########
@@ -91,21 +91,47 @@ prepare_job_manager_start() {
     envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" 
"${CONF_FILE}"
 }
 
+disable_jemalloc_env() {
+  if [ "$1" = "disablejemalloc" ]; then

Review comment:
       I think we should add somewhere in the usage description that 
`disablejemalloc` is an option and describe what it does.

##########
File path: 1.11/scala_2.11-java11-debian/docker-entrypoint.sh
##########
@@ -91,21 +91,47 @@ prepare_job_manager_start() {
     envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" 
"${CONF_FILE}"
 }
 
+disable_jemalloc_env() {
+  if [ "$1" = "disablejemalloc" ]; then
+      echo "Disable Jemalloc as memory allocator" 
+      return 0
+  else
+      echo "Enable Jemalloc via appending env variable LD_PRELOAD with 
/usr/lib/x86_64-linux-gnu/libjemalloc.so"
+      export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so
+      return 1
+  fi
+}
+
 if [ "$1" = "help" ]; then
     echo "Usage: $(basename "$0") 
(jobmanager|${COMMAND_STANDALONE}|taskmanager|help)"

Review comment:
       The usage description is here.

##########
File path: 1.11/scala_2.11-java11-debian/docker-entrypoint.sh
##########
@@ -91,21 +91,47 @@ prepare_job_manager_start() {
     envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" 
"${CONF_FILE}"
 }
 
+disable_jemalloc_env() {

Review comment:
       This method seems to be duplicated across all `docker-entrypoint.sh` 
scripts. I guess this is more a question for @rmetzger and @zentol: Is there a 
way to share common code between the different docker files? It looks to me 
that the current setup is duplicating logic across several files.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to