hive metastore内存溢出
hive的metastore内存溢出,修改文件hive-env.sh
配置文件里面默认的
新增的
if [ "$SERVICE" = "cli" ]; then
if [ -z "$DEBUG" ]; then
export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xmx2048m -Xms2048m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit -verbose:gc -Xloggc:/opt/cdh/hive-1.1.0-cdh5.14.0/hivemeta.gc.log -XX:ErrorFile=/opt/cdh/hive-1.1.0-cdh5.14.0/hs_err_pid.log -XX:+UseParNewGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=85 -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:SurvivorRatio=4 -XX:CMSMaxAbortablePrecleanTime=1000 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC" -XX:-UseGCOverheadLimit"
else
export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xmx2048m -Xms2048m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit -verbose:gc -Xloggc:/opt/cdh/hive-1.1.0-cdh5.14.0/hivemeta.gc.log -XX:ErrorFile=/opt/cdh/hive-1.1.0-cdh5.14.0/hs_err_pid.log -XX:+UseParNewGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=85 -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:SurvivorRatio=4 -XX:CMSMaxAbortablePrecleanTime=1000 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC" -XX:-UseGCOverheadLimit"
fi
fi
export HADOOP_HEAPSIZE=4096