You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/04/12 20:33:20 UTC

svn commit: r1091534 - /hbase/trunk/src/docbkx/book.xml

Author: stack
Date: Tue Apr 12 18:33:19 2011
New Revision: 1091534

URL: http://svn.apache.org/viewvc?rev=1091534&view=rev
Log:
Added more on rolling restart

Modified:
    hbase/trunk/src/docbkx/book.xml

Modified: hbase/trunk/src/docbkx/book.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/src/docbkx/book.xml?rev=1091534&r1=1091533&r2=1091534&view=diff
==============================================================================
--- hbase/trunk/src/docbkx/book.xml (original)
+++ hbase/trunk/src/docbkx/book.xml Tue Apr 12 18:33:19 2011
@@ -1142,6 +1142,8 @@ false
             </para> 
         </note>
         </para>
+        <section xml:id="rolling">
+            <title>Rolling Restart</title>
         <para>
             You can also ask this script to restart a RegionServer after the shutdown
             AND move its old regions back into place.  The latter you might do to
@@ -1150,10 +1152,51 @@ false
             <programlisting>$ for i in `cat conf/regionservers|sort`; do ./bin/graceful_stop.sh --restart --reload --debug $i; done &amp;> /tmp/log.txt &amp;
             </programlisting>
             Tail the output of <filename>/tmp/log.txt</filename> to follow the scripts
-            progress. The above does regionservers only.  You'd need to do the master
-            update separately.
+            progress. The above does regionservers only.  Be sure to disable the
+            load balancer before doing the above.  You'd need to do the master
+            update separately.  Do it before you run the above script.
+            Here is a pseudo-script for how you might craft a rolling restart script:
+            <orderedlist>
+                <listitem><para>Untar your release, make sure of its configuration and
+                        then rsync it across the cluster. If this is 0.90.2, patch it
+                        with HBASE-3744 and HBASE-3756.
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>Run hbck to ensure the cluster consistent
+                        <programlisting>$ ./bin/hbase hbck</programlisting>
+                    Effect repairs if inconsistent.
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>Restart the Master: <programlisting>$ ./bin/hbase-daemon.sh stop master; ./bin/hbase-daemon.sh start master</programlisting>
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>
+                       Disable the region balancer:<programlisting>$ echo "balance_switch false" | ./bin/hbase</programlisting>
+                    </para>
+                </listitem>
+                <listitem>
+                     <para>Run the <filename>graceful_stop.sh</filename> script per regionserver.  For example:
+            <programlisting>$ for i in `cat conf/regionservers|sort`; do ./bin/graceful_stop.sh --restart --reload --debug $i; done &amp;> /tmp/log.txt &amp;
+            </programlisting>
+                     If you are running thrift or rest servers on the regionserver, pass --thrift or --rest options (See usage
+                     for <filename>graceful_stop.sh</filename> script).
+                 </para>
+                </listitem>
+                <listitem>
+                    <para>Restart the Master again.  This will clear out dead servers list and reenable the balancer.
+                    </para>
+                </listitem>
+                <listitem>
+                    <para>Run hbck to ensure the cluster is consistent.
+                    </para>
+                </listitem>
+            </orderedlist>
         </para>
     </section>
+    </section>
   </appendix>
 
   <appendix xml:id="compression">