Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat](docker)Modify the init_be and start_be scripts to meet the requirements for rapid Docker startup(Merge 2.1). #45858

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions bin/start_be.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,30 @@ DORIS_HOME="$(
)"
export DORIS_HOME

if [[ "$(uname -s)" != 'Darwin' ]]; then
MAX_MAP_COUNT="$(cat /proc/sys/vm/max_map_count)"
if [[ "${MAX_MAP_COUNT}" -lt 2000000 ]]; then
echo "Please set vm.max_map_count to be 2000000 under root using 'sysctl -w vm.max_map_count=2000000'."
exit 1
if [[ "${SKIP_CHECK_ULIMIT:- "false"}" != "true" ]]; then
if [[ "$(uname -s)" != 'Darwin' ]]; then
MAX_MAP_COUNT="$(cat /proc/sys/vm/max_map_count)"
if [[ "${MAX_MAP_COUNT}" -lt 2000000 ]]; then
echo "Please set vm.max_map_count to be 2000000 under root using 'sysctl -w vm.max_map_count=2000000'."
exit 1
fi

if [[ "$(swapon -s | wc -l)" -gt 1 ]]; then
echo "Please disable swap memory before installation."
exit 1
fi
fi

if [[ "$(swapon -s | wc -l)" -gt 1 ]]; then
echo "Please disable swap memory before installation."
MAX_FILE_COUNT="$(ulimit -n)"
if [[ "${MAX_FILE_COUNT}" -lt 60000 ]]; then
echo "Set max number of open file descriptors to a value greater than 60000."
echo "Ask your system manager to modify /etc/security/limits.conf and append content like"
echo " * soft nofile 655350"
echo " * hard nofile 655350"
echo "and then run 'ulimit -n 655350' to take effect on current session."
exit 1
fi
fi

MAX_FILE_COUNT="$(ulimit -n)"
if [[ "${MAX_FILE_COUNT}" -lt 60000 ]]; then
echo "Set max number of open file descriptors to a value greater than 60000."
echo "Ask your system manager to modify /etc/security/limits.conf and append content like"
echo " * soft nofile 655350"
echo " * hard nofile 655350"
echo "and then run 'ulimit -n 655350' to take effect on current session."
exit 1
fi

# add java libs
# Must add hadoop libs, because we should load specified jars
# instead of jars in hadoop libs, such as avro
Expand Down
1 change: 1 addition & 0 deletions docker/runtime/be/resource/init_be.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ _main() {
fi
check_be_status
doris_note "Ready to start BE!"
export SKIP_CHECK_ULIMIT=true
${DORIS_HOME}/be/bin/start_be.sh --console &
child_pid=$!
wait $child_pid
Expand Down
Loading