This document augments what is described in the HBase 'Getting Started' in the
Distributed Operation: Pseudo- and Fully-distributed modes section.
In particular it describes scripts that allow you start extra masters and regionservers when running in pseudo-distributed mode.
- Copy the pseudo-distributed suggested configuration file (feel free to take a peek and understand what it's doing)
% cp conf/hbase-site.xml{.pseudo-distributed.template,}
- (Optional) Start up Pseudo-distributed HDFS.
- If you do, go to conf/hbase-site.xml. Uncomment the 'hbase.rootdir' property.
- Additionally, if you want to test HBase with high data durability enabled, also uncomment the 'dfs.support.append' property.
- Start up the initial HBase cluster
- To start up an extra backup master(s) on the same server run
% bin/local-master-backup.sh start 1
Here the '1' means use ports 60001 & 60011, and this backup master's logfile will be at logs/hbase-${USER}-1-master-${HOSTNAME}.log.
To startup multiple backup masters run % bin/local-master-backup.sh start 2 3
You can start up to 9 backup masters (10 total).
- To start up more regionservers
% bin/local-regionservers.sh start 1
where '1' means use ports 60201 & 60301 and its logfile will be at logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log.
To add 4 more regionservers in addition to the one you just started by running % bin/local-regionservers.sh start 2 3 4 5
Supports up to 99 extra regionservers (100 total).
- To stop the cluster
- Assuming you want to stop master backup # 1, run
% cat /tmp/hbase-${USER}-1-master.pid |xargs kill -9
Note that bin/local-master-backup.sh stop 1 will try to stop the cluster along with the master
- To stop an individual regionserver, run
% bin/local-regionservers.sh stop 1