Details
Description
The hbase init scripts think the pid files will be over in /var/run/hbase.
However the daemon script used will put them down in /tmp (since no environment for HBASE_PID_DIR) is passed down, it falls back to that default.
Because of this the status-check with "/etc/init.d/hadoop-hbase-* status" always returns 'not running' even if the service is correctly running.
The good news is that both start and stop scenario's make the same mistake so the correct service is stopped.
The bad news is that /tmp is not an appropriate place to store these pid files: /tmp might get cleared out regularly (nightly) on some systems, making the stop-script disfunctional.
An easy work-around for people that don't want to touch their installation is to force the daemon scripts to use the correct environment explicitely, through
$ sudo vi /etc/hbase/conf/hbase-env.sh # there add a line:
export HBASE_PID_DIR=/var/run/hbase/
The provided patch simply passes down the HBASE_PID-DIR context to the su hbase statement that launches the daemon script, and does so for both hbase-master and hbase-regionserver. However, comparing with the hadoop start-stop scripts in cdh3b4 this might better be done through using the daemon function from /etc/init.d/functions