You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/06/03 08:34:21 UTC
[doris] 09/09: [chore](macOS) Fix JAVA_OPTS in start_be.sh (#19267)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
commit e87339851134918dd31940feea9094e79e2b05c1
Author: Adonis Ling <ad...@gmail.com>
AuthorDate: Mon May 8 14:01:10 2023 +0800
[chore](macOS) Fix JAVA_OPTS in start_be.sh (#19267)
We should set -XX:-MaxFDLimit on macOS if we enable java support for BE otherwise BE may fail to start up.
---
bin/start_be.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bin/start_be.sh b/bin/start_be.sh
index cb37a54cf8..b36c1569a4 100755
--- a/bin/start_be.sh
+++ b/bin/start_be.sh
@@ -286,7 +286,15 @@ else
fi
if [[ "${MACHINE_OS}" == "Darwin" ]]; then
- final_java_opt="${final_java_opt} -XX:-MaxFDLimit"
+ max_fd_limit='-XX:-MaxFDLimit'
+
+ if ! echo "${final_java_opt}" | grep "${max_fd_limit/-/\-}" >/dev/null; then
+ final_java_opt="${final_java_opt} ${max_fd_limit}"
+ fi
+
+ if [[ -n "${JAVA_OPTS}" ]] && ! echo "${JAVA_OPTS}" | grep "${max_fd_limit/-/\-}" >/dev/null; then
+ JAVA_OPTS="${JAVA_OPTS} ${max_fd_limit}"
+ fi
fi
# set LIBHDFS_OPTS for hadoop libhdfs
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org