hive metastore && hiveserver2 . jvm 配置调整优化

hive-env.sh 添加如下,其中踩坑踩了不少。

 

if [ "$SERVICE" = "metastore" ]; then
if [ -z "$DEBUG" ]; then
export HIVE_METASTORE_HADOOP_OPTS=" -XX:+PrintCommandLineFlags -Xms12g -Xmx12g -XX:MetaspaceSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFract
ion=75 -XX:+UseCMSInitiatingOccupancyOnly -verbose:gc -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintPromotionFailure -XX:+PrintGCDat
eStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=2 -XX:GCLogFileSize=512M -Xloggc:/app/hive/log/gc-metastore.log"
else
export HIVE_METASTORE_HADOOP_OPTS=" -XX:+PrintCommandLineFlags -Xms12g -Xmx12g -XX:MetaspaceSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFract
ion=75 -XX:+UseCMSInitiatingOccupancyOnly -verbose:gc -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintPromotionFailure -XX:+PrintGCDat
eStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=2 -XX:GCLogFileSize=512M -Xloggc:/app/hive/log/gc-metastore.log"
fi
export HADOOP_CLIENT_OPTS=" -Xmx12g -Xss512k $HADOOP_CLIENT_OPTS"
fi

 

if [ "$SERVICE" = "hiveserver2" ]; then
if [ -z "$DEBUG" ]; then
export HIVE_SERVER2_HADOOP_OPTS="$HADOOP_OPTS -XX:+PrintCommandLineFlags -Xms12g -Xmx12g -XX:MetaspaceSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccu
pancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -verbose:gc -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintPromotionFailure -XX:+
PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=2 -XX:GCLogFileSize=512M -Xloggc:/app/hive/log/gc-hiveserver2.log"
else
export HIVE_SERVER2_HADOOP_OPTS="$HADOOP_OPTS -XX:+PrintCommandLineFlags -Xms12g -Xmx12g -XX:MetaspaceSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccu
pancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -verbose:gc -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintPromotionFailure -XX:+
PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=2 -XX:GCLogFileSize=512M -Xloggc:/app/hive/log/gc-hiveserver2.log"
fi
export HADOOP_CLIENT_OPTS=" -Xmx12g -Xss512k $HADOOP_CLIENT_OPTS"
fi

posted @ 2018-09-12 21:58  Zeus~  阅读(1372)  评论(0编辑  收藏  举报