hbase-6019. porting pseudo-dist html page to RefGuide Config chapter.

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1339225 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doug Meil 2012-05-16 15:21:25 +00:00
parent 7693a7c9f2
commit 4fb583bafb
3 changed files with 101 additions and 79 deletions

View File

@ -401,36 +401,22 @@ to ensure well-formedness of your document after an edit session.
HBase. Do not use this configuration for production nor for
evaluating HBase performance.</para>
<para>Once you have confirmed your HDFS setup, edit
<filename>conf/hbase-site.xml</filename>. This is the file into
<para>First, confirm your local HDFS setup. Below is an example <filename>conf/hdfs-site.xml</filename>. Note
that the replication is set to 1 because this is a pseudo-distributed setup. The properties <varname>dfs.name.dir</varname>
and <varname>dfs.data.dir</varname> are being set explicitly, the latter being where HDFS data will exist on your machine.
</para>
<para>Next, configure HBase for usage. Below is an example <filename>conf/hbase-site.xml</filename>. Note
that the <varname>hbase.rootdir</varname> property points to the local HDFS instance. This is the file into
which you add local customizations and overrides for
<xreg linkend="hbase_default_configurations" /> and <xref linkend="hdfs_client_conf" />. Point HBase at the running Hadoop HDFS
instance by setting the <varname>hbase.rootdir</varname> property.
This property points HBase at the Hadoop filesystem instance to use.
For example, adding the properties below to your
<filename>hbase-site.xml</filename> says that HBase should use the
<filename>/hbase</filename> directory in the HDFS whose namenode is
at port 8020 on your local machine, and that it should run with one
replica only (recommended for pseudo-distributed mode):</para>
<xref linkend="hbase_default_configurations" /> and <xref linkend="hdfs_client_conf" />
</para>
<programlisting>
&lt;configuration&gt;
...
&lt;property&gt;
&lt;name&gt;hbase.rootdir&lt;/name&gt;
&lt;value&gt;hdfs://localhost:8020/hbase&lt;/value&gt;
&lt;description&gt;The directory shared by RegionServers.
&lt;/description&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;dfs.replication&lt;/name&gt;
&lt;value&gt;1&lt;/value&gt;
&lt;description&gt;The replication count for HLog and HFile storage. Should not be greater than HDFS datanode count.
&lt;/description&gt;
&lt;/property&gt;
...
&lt;/configuration&gt;
</programlisting>
<para>Now skip to <xref linkend="confirm" /> for how to start and verify your
pseudo-distributed install. <footnote>
<para>See <xref linkend="pseudo.extras">Pseudo-distributed
mode extras</xref> for notes on how to start extra Masters and
RegionServers when running pseudo-distributed.</para>
</footnote></para>
<note>
<para>Let HBase create the <varname>hbase.rootdir</varname>
@ -445,14 +431,90 @@ to ensure well-formedness of your document after an edit session.
want to connect from a remote location.</para>
</note>
<para>Now skip to <xref linkend="confirm" /> for how to start and verify your
pseudo-distributed install. <footnote>
<para>See <link
xlink:href="http://hbase.apache.org/pseudo-distributed.html">Pseudo-distributed
mode extras</link> for notes on how to start extra Masters and
RegionServers when running pseudo-distributed.</para>
</footnote></para>
</section>
<section xml:id="pseudo.config">
<title>Pseudo-distributed Configuration Files</title>
<para>The following are exmaple configuration files from a pseudo-distributed setup.
</para>
<filename>hdfs-site.xml</filename>
<programlisting>
&lt;configuration&gt;
...
&lt;property&gt;
&lt;name&gt;dfs.name.dir&lt;/name&gt;
&lt;value&gt;/Users/local/user.name/hdfs-data-name&lt;/value&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;dfs.data.dir&lt;/name&gt;
&lt;value&gt;/Users/local/user.name/hdfs-data&lt;/value&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;dfs.replication&lt;/name&gt;
&lt;value&gt;1&lt;/value&gt;
&lt;/property&gt;
...
&lt;/configuration&gt;
</programlisting>
<filename>hbase-site.xml</filename>
<programlisting>
&lt;configuration&gt;
...
&lt;property&gt;
&lt;name&gt;hbase.rootdir&lt;/name&gt;
&lt;value&gt;hdfs://localhost:8020/hbase&lt;/value&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;hbase.zookeeper.quorum&lt;/name&gt;
&lt;value&gt;localhost&lt;/value&gt;
&lt;/property&gt;
&lt;property&gt;
&lt;name&gt;hbase.cluster.distributed&lt;/name&gt;
&lt;value&gt;true&lt;/value&gt;
&lt;/property&gt;
...
&lt;/configuration&gt;
</programlisting>
</section>
<section xml:id="pseudo.extras">
<title>Pseudo-distributed Extras</title>
<section xml:id="pseudo.extras.start">
<title>Startup</title>
<para>To start up the initial HBase cluster...
<programlisting>% bin/start-hbase.sh</programlisting>
</para>
<para>To start up an extra backup master(s) on the same server run...
<programlisting>% bin/local-master-backup.sh start 1</programlisting>
... the '1' means use ports 60001 &amp; 60011, and this backup master's logfile will be at <filename>logs/hbase-${USER}-1-master-${HOSTNAME}.log</filename>.
</para>
<para>To startup multiple backup masters run... <programlisting>% bin/local-master-backup.sh start 2 3</programlisting> You can start up to 9 backup masters (10 total).
</para>
<para>To start up more regionservers...
<programlisting>% bin/local-regionservers.sh start 1</programlisting>
where '1' means use ports 60201 &amp; 60301 and its logfile will be at <filename>logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log</filename>.
</para>
<para>To add 4 more regionservers in addition to the one you just started by running... <programlisting>% bin/local-regionservers.sh start 2 3 4 5</programlisting>
This supports up to 99 extra regionservers (100 total).
</para>
</section>
<section xml:id="pseudo.options.stop">
<title>Stop</title>
<para>Assuming you want to stop master backup # 1, run...
<programlisting>% cat /tmp/hbase-${USER}-1-master.pid |xargs kill -9</programlisting>
Note that bin/local-master-backup.sh stop 1 will try to stop the cluster along with the master.
</para>
<para>To stop an individual regionserver, run...
<programlisting>% bin/local-regionservers.sh stop 1
</programlisting>
</para>
</section>
</section>
</section>
<section xml:id="fully_dist">
<title>Fully-distributed</title>

View File

@ -58,7 +58,6 @@
<item name="Metrics" href="metrics.html" />
<item name="HBase on Windows" href="cygwin.html" />
<item name="Cluster replication" href="replication.html" />
<item name="Pseudo-Dist. Extras" href="pseudo-distributed.html" />
</menu>
</body>
<skin>

View File

@ -28,51 +28,12 @@ Running HBase in pseudo-distributed mode
</properties>
<body>
<p>This document augments what is described in the HBase 'Getting Started' in the
<a href="http://hbase.apache.org/book.html#distributed">Distributed Operation: Pseudo- and Fully-distributed modes</a> section
<p>This page has been retired. The contents have been moved to the
<a href="http://hbase.apache.org/book.html#distributed">Distributed Operation: Pseudo- and Fully-distributed modes</a> section
in the Reference Guide.
In particular it describes scripts that allow you start extra masters and regionservers when running in pseudo-distributed mode.
</p>
<ol><li>Copy the pseudo-distributed suggested configuration file (feel free to take a peek and understand what it's doing)
<source>% cp conf/hbase-site.xml{.pseudo-distributed.template,}</source>
</li>
<li>(Optional) Start up <a href="http://hadoop.apache.org/common/docs/r0.20.2/quickstart.html#PseudoDistributed">Pseudo-distributed HDFS</a>.
<ol><li>If you do, go to conf/hbase-site.xml. Uncomment the 'hbase.rootdir' property.
</li>
<li>Additionally, if you want to test HBase with high data durability enabled, also uncomment the 'dfs.support.append' property.
</li>
</ol>
</li>
<li>Start up the initial HBase cluster
<source>% bin/start-hbase.sh</source>
<ol> <li>To start up an extra backup master(s) on the same server run
<source>% bin/local-master-backup.sh start 1</source>
Here the '1' means use ports 60001 &amp; 60011, and this backup master's logfile will be at <i>logs/hbase-${USER}-1-master-${HOSTNAME}.log</i>.
To startup multiple backup masters run <source>% bin/local-master-backup.sh start 2 3</source> You can start up to 9 backup masters (10 total).
</li>
<li>To start up more regionservers
<source>% bin/local-regionservers.sh start 1</source>
where '1' means use ports 60201 &amp; 60301 and its logfile will be at <i>logs/hbase-${USER}-1-regionserver-${HOSTNAME}.log</i>.
To add 4 more regionservers in addition to the one you just started by running <source>% bin/local-regionservers.sh start 2 3 4 5</source>
Supports up to 99 extra regionservers (100 total).
</li>
</ol>
</li>
<li>To stop the cluster
<ol>
<li>Assuming you want to stop master backup # 1, run
<source>% cat /tmp/hbase-${USER}-1-master.pid |xargs kill -9</source>
Note that bin/local-master-backup.sh stop 1 will try to stop the cluster along with the master
</li>
<li>To stop an individual regionserver, run
<source>% bin/local-regionservers.sh stop 1
</source>
</li>
</ol>
</li>
</ol>
</body>
</body>
</document>