Skip to content

Commit

Permalink
[chore](macOS) Fix JAVA_OPTS in start_be.sh (apache#19267)
Browse files Browse the repository at this point in the history
We should set -XX:-MaxFDLimit on macOS if we enable java support for BE otherwise BE may fail to start up.
  • Loading branch information
adonis0147 authored May 8, 2023
1 parent 05c5c59 commit 8c4f3d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/start_be.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,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
Expand Down

0 comments on commit 8c4f3d4

Please sign in to comment.