11-hbase-daemon.sh start regionserver启动命令分析

hbase-daemon.sh start regionserver
(start)中
nohup $thiscmd --config "${HBASE_CONF_DIR}" foreground_start $command $args < /dev/null > ${HBASE_LOGOUT} 2>&1  &


(foreground_start)中 
nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase --config "${HBASE_CONF_DIR}" $command "$@" start >> ${HBASE_LOGOUT} 2>&1 &
上面启动命令简化转化为$HBASE_HOME/bin/hbase --config /usr/local/fqlhadoop/hbase-1.1.2/conf regionserver start(可在命令行执行hbase regionserver start,这样在控制台输出HRegionServer启动、停止信息)
elif [ "$COMMAND" = "regionserver" ] ; then
 CLASS='org.apache.hadoop.hbase.regionserver.HRegionServer'


最终启动命令转换为
exec "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS $CLASS "$@"
$xxx替换为相应的值,最终转化为:
java -Dproc_regionserver -XX:OnOutOfMemoryError="kill -9 %p" -XX:PermSize=128m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128m -Xmx1g -Xms1g -Xmn512m -verbose:gc -Xloggc:/usr/local/fqlhadoop/logs/hbase/hbase.gc.log -XX:ErrorFile=/usr/local/fqlhadoop/logs/hbase/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=2000 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC -XX:NewRatio=3 -XX:+CMSParallelRemarkEnabled -Dhbase.log.dir=/usr/local/fqlhadoop/logs/hbase -Dhbase.log.file=hbase-biadmin-regionserver-4.hadoop.com.log -Dhbase.home.dir=/usr/local/fqlhadoop/hbase-1.1.2 -Dhbase.id.str=biadmin -Dhbase.root.logger=INFO,RFA -Djava.library.path=/usr/local/fqlhadoop/hadoop/lib/native:/usr/local/fqlhadoop/hadoop/lib/native:/usr/local/fqlhadoop/hbase-1.1.2/lib/native/Linux-amd64-64 -Dhbase.security.logger=INFO,RFAS -cp *.jarorg.apache.hadoop.hbase.regionserver.HRegionServer start


启动org.apache.hadoop.hbase.regionserver.HRegionServer,main(*)作为入口,执行Java代码

你可能感兴趣的:(HBase源码)