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

HIVE-28235 : Hive should honour heapsize set in hive-env #5226

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions bin/hive
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,23 @@ if [[ "$SERVICE" =~ ^(hiveserver2|beeline|cli)$ ]] ; then
fi
fi

# set heap size of hive processes based on HADOOP_HEAPSIZE env variables
if [[ -n "${HADOOP_HEAPSIZE_MAX}" ]]; then
if [[ "${HADOOP_HEAPSIZE_MAX}" =~ ^[0-9]+$ ]]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Xmx${HADOOP_HEAPSIZE_MAX}m "
fi
elif [[ -n "${HADOOP_HEAPSIZE}" ]]; then
if [[ "${HADOOP_HEAPSIZE}" =~ ^[0-9]+$ ]]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Xmx${HADOOP_HEAPSIZE}m "
fi
fi

if [[ -n "${HADOOP_HEAPSIZE_MIN}" ]]; then
if [[ "${HADOOP_HEAPSIZE_MIN}" =~ ^[0-9]+$ ]]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Xms${HADOOP_HEAPSIZE_MIN}m "
fi
fi

export JVM_PID="$$"

if [ "$TORUN" = "" ] ; then
Expand Down