3
# Provides: hbase-master
4
# Required-Start: $remote_fs
5
# Required-Stop: $remote_fs
6
# Default-Start: 2 3 4 5
8
# Should-Start: zookeeper
9
# Should-Stop: zookeeper
10
# Short-Description: HBase Master
11
# Description: Coordinates the hbase regionservers
14
# Author: Thomas Koch <thomas.koch@ymc.ch>
19
WRAPPER="/usr/bin/hbase $NAME start"
20
export HBASE_LOG_DIR=/var/log/hadoop
21
export HBASE_LOGFILE=hbase-$NAME.log
22
export HBASE_ROOT_LOGGER=INFO,DRFA
27
# 0 if daemon has been stopped
28
# 1 if daemon was already stopped
29
# 2 if daemon could not be stopped
30
# other if a failure occurred
33
[ "$RETVAL" = $EXIT_FAILURE ] && return 1
34
# Wait for children to finish too if this is a daemon that forks
35
# and if the daemon is only ever run from this initscript.
36
# If the above conditions are not satisfied then add some other code
37
# that waits for the process to drop all resources that could be
38
# needed by services started subsequently. A last resort is to
39
# sleep for some time.
41
/usr/bin/hbase master stop
43
# wait for termination
44
for i in 1 2 3 4 5 6 7 8 9
48
[ "$RETVAL" = $EXIT_SUCCESS ] && sleep 1 && continue
49
[ "$RETVAL" = $EXIT_FAILURE ] && return 0
55
[ -r /usr/share/hadoop/common-init.sh ] && . /usr/share/hadoop/common-init.sh