You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/03/27 10:21:14 UTC
[28/50] [abbrv] hbase git commit: HBASE-20130 Use defaults (16020 &
16030) as base ports when the RS is bound to localhost
HBASE-20130 Use defaults (16020 & 16030) as base ports when the RS is bound to localhost
Base ports are changed to defaults 16020 & 16030 when RS binds to localhost. This is mostly used in pseudo distributed mode.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a73f4d84
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a73f4d84
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a73f4d84
Branch: refs/heads/HBASE-19064
Commit: a73f4d84a0428eaf2e6253e2840b580b27c5968c
Parents: b30ff81
Author: Umesh Agashe <ua...@cloudera.com>
Authored: Mon Mar 26 12:10:27 2018 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Mon Mar 26 14:11:20 2018 -0700
----------------------------------------------------------------------
bin/local-regionservers.sh | 10 +++++++---
bin/regionservers.sh | 4 ++--
src/main/asciidoc/_chapters/getting_started.adoc | 8 ++++----
3 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/a73f4d84/bin/local-regionservers.sh
----------------------------------------------------------------------
diff --git a/bin/local-regionservers.sh b/bin/local-regionservers.sh
index 40ba93e..79dc5d0 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}" \
http://git-wip-us.apache.org/repos/asf/hbase/blob/a73f4d84/bin/regionservers.sh
----------------------------------------------------------------------
diff --git a/bin/regionservers.sh b/bin/regionservers.sh
index 6db11bb..b83c1f3 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: /" &
http://git-wip-us.apache.org/repos/asf/hbase/blob/a73f4d84/src/main/asciidoc/_chapters/getting_started.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/getting_started.adoc b/src/main/asciidoc/_chapters/getting_started.adoc
index 3a5a772..2229eee 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).
+
----