HBASE-11575 Pseudo distributed mode does not work as documented
This commit is contained in:
parent
d8562052a4
commit
147a3521f9
@ -76,7 +76,7 @@ HBASE_REGIONSERVERS="${HBASE_REGIONSERVERS:-$HBASE_CONF_DIR/regionservers}"
|
|||||||
# List of hbase secondary masters.
|
# List of hbase secondary masters.
|
||||||
HBASE_BACKUP_MASTERS="${HBASE_BACKUP_MASTERS:-$HBASE_CONF_DIR/backup-masters}"
|
HBASE_BACKUP_MASTERS="${HBASE_BACKUP_MASTERS:-$HBASE_CONF_DIR/backup-masters}"
|
||||||
# Thrift JMX opts
|
# 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"
|
HBASE_THRIFT_JMX_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10103"
|
||||||
fi
|
fi
|
||||||
# Thrift opts
|
# Thrift opts
|
||||||
@ -85,7 +85,7 @@ if [ -z "$HBASE_THRIFT_OPTS" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# REST JMX opts
|
# 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"
|
HBASE_REST_JMX_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10105"
|
||||||
fi
|
fi
|
||||||
# REST opts
|
# REST opts
|
||||||
|
@ -42,8 +42,9 @@ run_master () {
|
|||||||
DN=$2
|
DN=$2
|
||||||
export HBASE_IDENT_STRING="$USER-$DN"
|
export HBASE_IDENT_STRING="$USER-$DN"
|
||||||
HBASE_MASTER_ARGS="\
|
HBASE_MASTER_ARGS="\
|
||||||
-D hbase.master.port=`expr 16000 + $DN` \
|
|
||||||
-D hbase.master.info.port=`expr 16010 + $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"
|
--backup"
|
||||||
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 master $HBASE_MASTER_ARGS
|
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 master $HBASE_MASTER_ARGS
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,8 @@ run_regionserver () {
|
|||||||
DN=$2
|
DN=$2
|
||||||
export HBASE_IDENT_STRING="$USER-$DN"
|
export HBASE_IDENT_STRING="$USER-$DN"
|
||||||
HBASE_REGIONSERVER_ARGS="\
|
HBASE_REGIONSERVER_ARGS="\
|
||||||
-D hbase.regionserver.port=`expr 60200 + $DN` \
|
-D hbase.regionserver.port=`expr 16200 + $DN` \
|
||||||
-D hbase.regionserver.info.port=`expr 60300 + $DN`"
|
-D hbase.regionserver.info.port=`expr 16300 + $DN`"
|
||||||
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 regionserver $HBASE_REGIONSERVER_ARGS
|
"$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" $1 regionserver $HBASE_REGIONSERVER_ARGS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
localhost
|
|
@ -327,13 +327,22 @@ $
|
|||||||
<title>Configure HBase.</title>
|
<title>Configure HBase.</title>
|
||||||
<para>
|
<para>
|
||||||
Edit the <filename>hbase-site.xml</filename> configuration. First, add the following
|
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
|
properties. Property <code>hbase.cluster.distributed</code> is set to <code>true</code>
|
||||||
daemon.
|
(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>
|
</para>
|
||||||
<programlisting><![CDATA[
|
<programlisting><![CDATA[
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.cluster.distributed</name>
|
<name>hbase.cluster.distributed</name>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>hbase.master.wait.on.regionservers.mintostart</name>
|
||||||
|
<value>1</value>
|
||||||
</property>
|
</property>
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
<para>Next, change the <code>hbase.rootdir</code> from the local filesystem to the address
|
<para>Next, change the <code>hbase.rootdir</code> from the local filesystem to the address
|
||||||
@ -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,
|
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
|
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
|
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
|
three ports (16010, 16020, and 16030 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
|
using an offset of 2, the backup HMaster would use ports 16012, 16022, and 16032. The
|
||||||
following command starts 3 backup servers using ports 16002/16012, 16003/16013, and
|
following command starts 3 backup servers using ports 16012/16022/16032, 16013/16023/16033,
|
||||||
16005/16015.</para>
|
and 16015/16025/16035.</para>
|
||||||
<screen>
|
<screen>
|
||||||
$ ./bin/local-master-backup.sh 2 3 5
|
$ ./bin/local-master-backup.sh 2 3 5
|
||||||
</screen>
|
</screen>
|
||||||
@ -417,9 +426,12 @@ $ cat /tmp/hbase-testuser-1-master.pid |xargs kill -9
|
|||||||
RegionServers. It works in a similar way to the
|
RegionServers. It works in a similar way to the
|
||||||
<command>local-master-backup.sh</command> command, in that each parameter you provide
|
<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
|
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
|
the default ports are 16020 and 16030. However, the base ports for additional RegionServers
|
||||||
total, on a server. The following command starts four additional
|
are not the default ports since the default ports are used by the HMaster, which is also
|
||||||
RegionServers, running on sequential ports starting at 16202/16302.</para>
|
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>
|
<screen>
|
||||||
$ .bin/local-regionservers.sh start 2 3 4 5
|
$ .bin/local-regionservers.sh start 2 3 4 5
|
||||||
</screen>
|
</screen>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user