diff --git a/bin/ext/hiveserver2.sh b/bin/ext/hiveserver2.sh index 42d3d79..b0863dd 100644 --- a/bin/ext/hiveserver2.sh +++ b/bin/ext/hiveserver2.sh @@ -17,6 +17,12 @@ THISSERVICE=hiveserver2 export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} " hiveserver2() { + # Set HiveServer2 JVM configs + if [[ -z "${HIVESERVER2_JVM_OPTS}" ]]; then + HIVESERVER2_JVM_OPTS="-Xms128m -Xmx2048m -XX:MaxPermSize=128m" + fi + export HADOOP_CLIENT_OPTS="${HADOOP_CLIENT_OPTS} ${HIVESERVER2_JVM_OPTS}" + CLASS=org.apache.hive.service.server.HiveServer2 if $cygwin; then HIVE_LIB=`cygpath -w "$HIVE_LIB"` diff --git a/bin/ext/metastore.sh b/bin/ext/metastore.sh index 22b2d5d..884cdce 100644 --- a/bin/ext/metastore.sh +++ b/bin/ext/metastore.sh @@ -17,12 +17,18 @@ THISSERVICE=metastore export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} " metastore() { + # Set Metastore JVM configs + if [[ -z "${METASTORE_JVM_OPTS}" ]]; then + METASTORE_JVM_OPTS="-Xms128m -Xmx2048m -XX:MaxPermSize=128m" + fi + export HADOOP_CLIENT_OPTS="${HADOOP_CLIENT_OPTS} ${METASTORE_JVM_OPTS}" + echo "Starting Hive Metastore Server" CLASS=org.apache.hadoop.hive.metastore.HiveMetaStore if $cygwin; then HIVE_LIB=`cygpath -w "$HIVE_LIB"` fi - JAR=${HIVE_LIB}/hive-service-*.jar + JAR=${HIVE_LIB}/hive-metastore-*.jar # hadoop 20 or newer - skip the aux_jars option and hiveconf diff --git a/conf/hive-env.sh.template b/conf/hive-env.sh.template index 91a2905..a89d39d 100644 --- a/conf/hive-env.sh.template +++ b/conf/hive-env.sh.template @@ -50,5 +50,13 @@ # Hive Configuration Directory can be controlled by: # export HIVE_CONF_DIR= -# Folder containing extra ibraries required for hive compilation/execution can be controlled by: +# Folder containing extra libraries required for hive compilation/execution can be controlled by: # export HIVE_AUX_JARS_PATH= + +# HiveServer2 JVM Configs +# These are appended to HADOOP_CLIENT_OPTS eventually +# export HIVESERVER2_JVM_OPTS="-Xms128m -Xmx2048m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=" + +# Metastore JVM Configs +# These are appended to HADOOP_CLIENT_OPTS eventually +# export METASTORE_JVM_OPTS="-Xms128m -Xmx2048m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="