From commits-return-70216-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Mon Mar 26 23:10:30 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 13438180649 for ; Mon, 26 Mar 2018 23:10:29 +0200 (CEST) Received: (qmail 63459 invoked by uid 500); 26 Mar 2018 21:10:29 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 63450 invoked by uid 99); 26 Mar 2018 21:10:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2018 21:10:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9E355F4E82; Mon, 26 Mar 2018 21:10:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stack@apache.org To: commits@hbase.apache.org Message-Id: <98f1ec0d242a40249b7812ee468e0d7f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-20130 Use defaults (16020 & 16030) as base ports when the RS is bound to localhost Date: Mon, 26 Mar 2018 21:10:28 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/branch-2.0 b060ce15e -> 7553333a9 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/7553333a Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7553333a Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7553333a Branch: refs/heads/branch-2.0 Commit: 7553333a919972f25ae46b0d24d7eb99d1a99fc5 Parents: b060ce1 Author: Umesh Agashe Authored: Mon Mar 26 12:10:27 2018 -0700 Committer: Michael Stack Committed: Mon Mar 26 14:10:18 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/7553333a/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/7553333a/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/7553333a/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 2fdb949..dae3688 100644 --- a/src/main/asciidoc/_chapters/getting_started.adoc +++ b/src/main/asciidoc/_chapters/getting_started.adoc @@ -410,10 +410,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). + ----