Put this .conf file in your /etc/init folder.
description "Hive Server"
start on runlevel [2345]
stop on runlevel [016]
expect fork
script
echo "Starting Hive Service"
export HIVE_HOME=/usr/lib/hive-0.11.0-bin
export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
export HIVE_CONF_DIR=/etc/hive/conf/hiveserver1
$HIVE_HOME/bin/hive --service hiveserver > /var/log/hive/hiveserver.out 2>&1 &
end script
To start/stop/check your service you can use
start hiveserver
stop hiveserver
status hiveserver
description "Hive Server"
start on runlevel [2345]
stop on runlevel [016]
expect fork
script
echo "Starting Hive Service"
export HIVE_HOME=/usr/lib/hive-0.11.0-bin
export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
export HIVE_CONF_DIR=/etc/hive/conf/hiveserver1
$HIVE_HOME/bin/hive --service hiveserver > /var/log/hive/hiveserver.out 2>&1 &
end script
To start/stop/check your service you can use
start hiveserver
stop hiveserver
status hiveserver
No comments:
Post a Comment