hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject git commit: HBASE-11575 Pseudo distributed mode does not work as documented
Date Thu, 24 Jul 2014 17:05:05 GMT
Repository: hbase
Updated Branches:
  refs/heads/master d8401c8e4 -> cc61cc308


HBASE-11575 Pseudo distributed mode does not work as documented


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cc61cc30
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cc61cc30
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cc61cc30

Branch: refs/heads/master
Commit: cc61cc308168af407a2f21851e9932292af8ca77
Parents: d8401c8
Author: Jimmy Xiang <jxiang@cloudera.com>
Authored: Wed Jul 23 11:42:22 2014 -0700
Committer: Jimmy Xiang <jxiang@cloudera.com>
Committed: Thu Jul 24 10:04:35 2014 -0700

----------------------------------------------------------------------
 bin/hbase-config.sh                 |  4 ++--
 bin/local-master-backup.sh          |  3 ++-
 bin/local-regionservers.sh          |  4 ++--
 conf/regionservers                  |  1 -
 src/main/docbkx/getting_started.xml | 32 ++++++++++++++++++++++----------
 5 files changed, 28 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/cc61cc30/bin/hbase-config.sh
----------------------------------------------------------------------
diff --git a/bin/hbase-config.sh b/bin/hbase-config.sh
index 36982f8..dea1881 100644
--- a/bin/hbase-config.sh
+++ b/bin/hbase-config.sh
@@ -76,7 +76,7 @@ HBASE_REGIONSERVERS="${HBASE_REGIONSERVERS:-$HBASE_CONF_DIR/regionservers}"
 # List of hbase secondary masters.
 HBASE_BACKUP_MASTERS="${HBASE_BACKUP_MASTERS:-$HBASE_CONF_DIR/backup-masters}"
 # Thrift JMX opts
-if [[ -n "$HBASE_JMX_OPTS" && -z "$HBASE_THRIFT_JMX_OPTS" ]]; then
+if [ -n "$HBASE_JMX_OPTS" ] && [ -z "$HBASE_THRIFT_JMX_OPTS" ]; then
   HBASE_THRIFT_JMX_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10103"
 fi
 # Thrift opts
@@ -85,7 +85,7 @@ if [ -z "$HBASE_THRIFT_OPTS" ]; then
 fi
 
 # REST JMX opts
-if [[ -n "$HBASE_JMX_OPTS" && -z "$HBASE_REST_JMX_OPTS" ]]; then
+if [ -n "$HBASE_JMX_OPTS" ] && [ -z "$HBASE_REST_JMX_OPTS" ]; then
   HBASE_REST_JMX_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10105"
 fi
 # REST opts

http://git-wip-us.apache.org/repos/asf/hbase/blob/cc61cc30/bin/local-master-backup.sh
----------------------------------------------------------------------
diff --git a/bin/local-master-backup.sh b/bin/local-master-backup.sh
index f5d296d..36a70fa 100755
--- a/bin/local-master-backup.sh
+++ b/bin/local-master-backup.sh
@@ -42,8 +42,9 @@ run_master () {
   DN=$2
   export HBASE_IDENT_STRING="$USER-$DN"
   HBASE_MASTER_ARGS="\
-    -D hbase.master.port=`expr 16000 + $DN` \
     -D hbase.master.info.port=`expr 16010 + $DN` \
+    -D hbase.regionserver.port=`expr 16020 + $DN` \
+    -D hbase.regionserver.info.port=`expr 16030 + $DN` \
     --backup"
   "$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 master $HBASE_MASTER_ARGS
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/cc61cc30/bin/local-regionservers.sh
----------------------------------------------------------------------
diff --git a/bin/local-regionservers.sh b/bin/local-regionservers.sh
index bf4372e..e2cea6d 100755
--- a/bin/local-regionservers.sh
+++ b/bin/local-regionservers.sh
@@ -42,8 +42,8 @@ run_regionserver () {
   DN=$2
   export HBASE_IDENT_STRING="$USER-$DN"
   HBASE_REGIONSERVER_ARGS="\
-    -D hbase.regionserver.port=`expr 60200 + $DN` \
-    -D hbase.regionserver.info.port=`expr 60300 + $DN`"
+    -D hbase.regionserver.port=`expr 16200 + $DN` \
+    -D hbase.regionserver.info.port=`expr 16300 + $DN`"
   "$bin"/hbase-daemon.sh  --config "${HBASE_CONF_DIR}" $1 regionserver $HBASE_REGIONSERVER_ARGS
 }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/cc61cc30/conf/regionservers
----------------------------------------------------------------------
diff --git a/conf/regionservers b/conf/regionservers
index 2fbb50c..e69de29 100644
--- a/conf/regionservers
+++ b/conf/regionservers
@@ -1 +0,0 @@
-localhost

http://git-wip-us.apache.org/repos/asf/hbase/blob/cc61cc30/src/main/docbkx/getting_started.xml
----------------------------------------------------------------------
diff --git a/src/main/docbkx/getting_started.xml b/src/main/docbkx/getting_started.xml
index da5946c..b4e9911 100644
--- a/src/main/docbkx/getting_started.xml
+++ b/src/main/docbkx/getting_started.xml
@@ -327,14 +327,23 @@ $
           <title>Configure HBase.</title>
           <para>
             Edit the <filename>hbase-site.xml</filename> configuration. First,
add the following
-            property, which directs HBase to run in distributed mode, with one JVM instance
per
-            daemon.
+            properties. Property <code>hbase.cluster.distributed</code> is set
to <code>true</code>
+            (Its default is <code>false</code>), which directs HBase to run in
distributed mode,
+            with one JVM instance per daemon. Since HBase version 1.0.0, a HMaster is also
a
+            RegionServer. So in pseudo-distributed mode, just one HMaster (also a RegionServer)
+            instance is started by default. Because there is just one RegionServer (the HMaster),
+            property <code>hbase.master.wait.on.regionservers.mintostart</code>
should be set to
+            <code>1</code> (Its default is changed to <code>2</code>
since version 1.0.0).
           </para>
           <programlisting><![CDATA[
 <property>
   <name>hbase.cluster.distributed</name>
   <value>true</value>
-</property>            
+</property>
+<property>
+  <name>hbase.master.wait.on.regionservers.mintostart</name>
+  <value>1</value>
+</property>
             ]]></programlisting>
           <para>Next, change the <code>hbase.rootdir</code> from the local
filesystem to the address
             of your HDFS instance, using the <code>hdfs:////</code> URI syntax.
In this example,
@@ -391,10 +400,10 @@ drwxr-xr-x   - hbase users          0 2014-06-25 21:49 /hbase/oldWALs
             servers, which makes 10 total HMasters, counting the primary. To start a backup
HMaster,
             use the <command>local-master-backup.sh</command>. For each backup
master you want to
             start, add a parameter representing the port offset for that master. Each HMaster
uses
-            two ports (16000 and 16010 by default). The port offset is added to these ports,
so
-            using an offset of 2, the first backup HMaster would use ports 16002 and 16012.
The
-            following command starts 3 backup servers using ports 16002/16012, 16003/16013,
and
-            16005/16015.</para>
+            three ports (16010, 16020, and 16030 by default). The port offset is added to
these ports, so
+            using an offset of 2, the backup HMaster would use ports 16012, 16022, and 16032.
The
+            following command starts 3 backup servers using ports 16012/16022/16032, 16013/16023/16033,
+            and 16015/16025/16035.</para>
             <screen>
 $ ./bin/local-master-backup.sh 2 3 5             
             </screen>
@@ -417,9 +426,12 @@ $ cat /tmp/hbase-testuser-1-master.pid |xargs kill -9
             RegionServers. It works in a similar way to the
             <command>local-master-backup.sh</command> command, in that each parameter
you provide
             represents the port offset for an instance. Each RegionServer requires two ports,
and
-            the default ports are 16200 and 16300. You can run 99 additional RegionServers,
or 100
-            total, on a server. The following command starts four additional
-          RegionServers, running on sequential ports starting at 16202/16302.</para>
+            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).</para>
           <screen>
 $ .bin/local-regionservers.sh start 2 3 4 5            
           </screen>


Mime
View raw message