diff --git a/bin/local-regionservers.sh b/bin/local-regionservers.sh index 40ba93eb919..79dc5d05e2d 100755 --- a/bin/local-regionservers.sh +++ b/bin/local-regionservers.sh @@ -18,7 +18,11 @@ # */ # This is used for starting multiple regionservers on the same machine. # run it from hbase-dir/ just like 'bin/hbase' -# Supports up to 100 regionservers (limitation = overlapping ports) +# Supports up to 10 regionservers (limitation = overlapping ports) +# For supporting more instances select different values (e.g. 16200, 16300) +# for HBASE_RS_BASE_PORT and HBASE_RS_INFO_BASE_PORT below +HBASE_RS_BASE_PORT=16020 +HBASE_RS_INFO_BASE_PORT=16030 bin=`dirname "${BASH_SOURCE-$0}"` bin=`cd "$bin" >/dev/null && pwd` @@ -44,8 +48,8 @@ run_regionserver () { DN=$2 export HBASE_IDENT_STRING="$USER-$DN" HBASE_REGIONSERVER_ARGS="\ - -Dhbase.regionserver.port=`expr 16200 + $DN` \ - -Dhbase.regionserver.info.port=`expr 16300 + $DN`" + -Dhbase.regionserver.port=`expr $HBASE_RS_BASE_PORT + $DN` \ + -Dhbase.regionserver.info.port=`expr $HBASE_RS_INFO_BASE_PORT + $DN`" "$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" \ --autostart-window-size "${AUTOSTART_WINDOW_SIZE}" \ diff --git a/bin/regionservers.sh b/bin/regionservers.sh index 6db11bb1323..b83c1f3c79e 100755 --- a/bin/regionservers.sh +++ b/bin/regionservers.sh @@ -60,8 +60,8 @@ fi regionservers=`cat "$HOSTLIST"` if [ "$regionservers" = "localhost" ]; then HBASE_REGIONSERVER_ARGS="\ - -Dhbase.regionserver.port=16201 \ - -Dhbase.regionserver.info.port=16301" + -Dhbase.regionserver.port=16020 \ + -Dhbase.regionserver.info.port=16030" $"${@// /\\ }" ${HBASE_REGIONSERVER_ARGS} \ 2>&1 | sed "s/^/$regionserver: /" & diff --git a/src/main/asciidoc/_chapters/getting_started.adoc b/src/main/asciidoc/_chapters/getting_started.adoc index 3a5a772c6dc..2229eee1d4c 100644 --- a/src/main/asciidoc/_chapters/getting_started.adoc +++ b/src/main/asciidoc/_chapters/getting_started.adoc @@ -392,10 +392,10 @@ Running multiple HRegionServers on the same system can be useful for testing in The `local-regionservers.sh` command allows you to run multiple RegionServers. It works in a similar way to the `local-master-backup.sh` command, in that each parameter you provide represents the port offset for an instance. Each RegionServer requires two ports, and the default ports are 16020 and 16030. -However, the base ports for additional RegionServers are not the default ports since the default ports are used by the HMaster, which is also a RegionServer since HBase version 1.0.0. -The base ports are 16200 and 16300 instead. -You can run 99 additional RegionServers that are not a HMaster or backup HMaster, on a server. -The following command starts four additional RegionServers, running on sequential ports starting at 16202/16302 (base ports 16200/16300 plus 2). +Since HBase version 1.1.0, HMaster doesn't use region server ports, this leaves 10 ports (16020 to 16029 and 16030 to 16039) to be used for RegionServers. +For supporting additional RegionServers, base ports can be changed in script 'local-regionservers.sh' to appropriate value. +e.g. With values 16200 and 16300 for base ports, 99 additional RegionServers can be supported, on a server. +The following command starts four additional RegionServers, running on sequential ports starting at 16022/16032 (base ports 16020/16030 plus 2). + ----