You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2008/10/22 02:13:55 UTC
svn commit: r706816 - in /hadoop/zookeeper/trunk: CHANGES.txt
docs/releasenotes.html docs/releasenotes.pdf
src/docs/src/documentation/content/xdocs/releasenotes.xml
Author: phunt
Date: Tue Oct 21 17:13:54 2008
New Revision: 706816
URL: http://svn.apache.org/viewvc?rev=706816&view=rev
Log:
ZOOKEEPER-191. forrest docs for upgrade.
Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/docs/releasenotes.html
hadoop/zookeeper/trunk/docs/releasenotes.pdf
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml
Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=706816&r1=706815&r2=706816&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct 21 17:13:54 2008
@@ -2,6 +2,8 @@
Non-backward compatible changes:
+ ZOOKEEPER-43. Server side of auto reset watches. (breed via mahadev)
+
ZOOKEEPER-132. Create Enum to replace CreateFlag in ZooKepper.create
method (Jakob Homan via phunt)
@@ -31,12 +33,12 @@
ZOOKEEPER-33. Better ACL management
(mahadev)
- ZOOKEEPER-43. Server side of auto reset watches.
-
Backward compatibile changes:
BUGFIXES:
+ ZOOKEEPER-191. forrest docs for upgrade. (mahadev via phunt)
+
ZOOKEEPER-201. validate magic number when reading snapshot and transaction
logs (mahadev via phunt)
Modified: hadoop/zookeeper/trunk/docs/releasenotes.html
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/releasenotes.html?rev=706816&r1=706815&r2=706816&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/docs/releasenotes.html (original)
+++ hadoop/zookeeper/trunk/docs/releasenotes.html Tue Oct 21 17:13:54 2008
@@ -330,19 +330,123 @@
</ul>
<p>
-The following must be run once, and only once, when upgrading the ZooKeeper server instances to version 3.0.0.
+
+<strong>The following must be run once, and only once, when upgrading the ZooKeeper server instances to version 3.0.0.</strong>
+
</p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+
+<p>
+ The <dataLogDir> and <dataDir> directories referenced
+ below are specified by the <em>dataLogDir</em>
+ and <em>dataLogDir</em> specification in your
+ ZooKeeper config file
+ respectively. <em>dataLogDir</em> defaults to the
+ value of <em>dataDir</em> if not specified explicitly
+ in the ZooKeeper server config file (in which case provide the
+ same directory for both parameters to the upgrade utility).
+ </p>
+
+</div>
+</div>
<ol>
<li>
-<p>TBD</p>
+<p>Shutdown the ZooKeeper server cluster.</p>
+</li>
+
+<li>
+<p>Backup your <dataLogDir> and <dataDir> directories</p>
+</li>
+
+<li>
+<p>Run upgrade using</p>
+
+<ul>
+
+<li>
+<p>
+<span class="codefrag computeroutput">bin/zkServer.sh upgrade <dataLogDir> <dataDir></span>
+</p>
+</li>
+
+</ul>
+
+<p>or</p>
+
+<ul>
+
+<li>
+<p>
+<span class="codefrag computeroutput">java -classpath pathtolog4j:pathtozookeeper.jar UpgradeMain <dataLogDir> <dataDir></span>
+</p>
+</li>
+
+</ul>
+
+<p>where <dataLogDir> is the directory where all transaction logs (log.*) are stored. <dataDir> is the directory where all the snapshots (snapshot.*) are stored.</p>
+
+</li>
+
+<li>
+<p>Restart the cluster. </p>
</li>
+
+</ol>
+<p>
+ If you have any failure during the upgrade procedure keep reading to sanitize your database.
+ </p>
+<p>This is how upgrade works in ZooKeeper. This will help you troubleshoot in case you have problems while upgrading</p>
+<ol>
+<li>
+<p>Upgrade moves files from <dataLogDir> and <dataDir> to <dataLogDir>/version-1/ and <dataDir>/version-1 respectively (version-1 sub-directory is created by the upgrade utility). </p>
+</li>
+
+<li>
+<p>Upgrade creates a new version sub-directory <dataDir>/version-2 and <dataLogDir>/version-2</p>
+</li>
+
+<li>
+<p>Upgrade reads the old database from <dataDir>/version-1 and <dataLogDir>/version-1 into the memory and creates a new upgraded snapshot. </p>
+</li>
+
+<li>
+<p>Upgrade writes the new database in <dataDir>/version-2. </p>
+</li>
+
+</ol>
+<p>Troubleshooting.</p>
+<ol>
+
+<li>
+<p>In case you start ZooKeeper 3.0 without upgrading from 2.0 on a 2.0 database - the servers will start up with an empty database.
+ This is because the servers assume that <dataDir>/version-2 and <dataLogDir>/version-2 will have the database to start with. Since this will be empty
+ in case of no upgrade, the servers will start with an empty database. In such a case, shutdown the ZooKeeper servers, remove the version-2 directory (remember
+ this will lead to loss of updates after you started 3.0.)
+ and then start the upgrade procedure.</p>
+</li>
+
+<li>
+<p>If the upgrade fails while trying to rename files into the version-1 directory, you should try and move all the files under <dataDir>/version-1
+ and <dataLogDir>/version-1 to <dataDir> and <dataLogDir> respectively. Then try upgrade again.
+ </p>
+
+</li>
+
+<li>
+<p> If you do not wish to run with ZooKeeper 3.0 and prefer to run with ZooKeeper 2.0 and have already upgraded - you can run ZooKeeper 2 with
+ the <dataDir> and <dataLogDir> directories changed to <dataDir>/version-1 and <dataLogDir>/version-1. Remember that you will lose all the updates that you made after the upgrade.
+</p>
+</li>
+
</ol>
</div>
-<a name="N100BA"></a><a name="changes"></a>
+<a name="N10120"></a><a name="changes"></a>
<h2 class="h3">Changes Since ZooKeeper 2.2.1</h2>
<div class="section">
<p>
Modified: hadoop/zookeeper/trunk/docs/releasenotes.pdf
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/releasenotes.pdf?rev=706816&r1=706815&r2=706816&view=diff
==============================================================================
Binary files - no diff available.
Modified: hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml?rev=706816&r1=706815&r2=706816&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml (original)
+++ hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml Tue Oct 21 17:13:54 2008
@@ -106,14 +106,66 @@
</itemizedlist>
<para>
-The following must be run once, and only once, when upgrading the ZooKeeper server instances to version 3.0.0.
+ <emphasis role="bold">The following must be run once, and only once, when upgrading the ZooKeeper server instances to version 3.0.0.</emphasis>
</para>
+<note>
+ <para>
+ The <dataLogDir> and <dataDir> directories referenced
+ below are specified by the <emphasis>dataLogDir</emphasis>
+ and <emphasis>dataLogDir</emphasis> specification in your
+ ZooKeeper config file
+ respectively. <emphasis>dataLogDir</emphasis> defaults to the
+ value of <emphasis>dataDir</emphasis> if not specified explicitly
+ in the ZooKeeper server config file (in which case provide the
+ same directory for both parameters to the upgrade utility).
+ </para>
+</note>
+
+<orderedlist>
+ <listitem><para>Shutdown the ZooKeeper server cluster.</para></listitem>
+ <listitem><para>Backup your <dataLogDir> and <dataDir> directories</para></listitem>
+ <listitem><para>Run upgrade using</para>
+ <itemizedlist>
+ <listitem><para><computeroutput>bin/zkServer.sh upgrade <dataLogDir> <dataDir></computeroutput></para></listitem>
+ </itemizedlist>
+ <para>or</para>
+ <itemizedlist>
+ <listitem><para><computeroutput>java -classpath pathtolog4j:pathtozookeeper.jar UpgradeMain <dataLogDir> <dataDir></computeroutput></para></listitem>
+ </itemizedlist>
+ <para>where <dataLogDir> is the directory where all transaction logs (log.*) are stored. <dataDir> is the directory where all the snapshots (snapshot.*) are stored.</para>
+ </listitem>
+ <listitem><para>Restart the cluster. </para></listitem>
+ </orderedlist>
+ <para>
+ If you have any failure during the upgrade procedure keep reading to sanitize your database.
+ </para>
+<para>This is how upgrade works in ZooKeeper. This will help you troubleshoot in case you have problems while upgrading</para>
<orderedlist>
- <listitem><para>TBD</para></listitem>
-</orderedlist>
+<listitem><para>Upgrade moves files from <dataLogDir> and <dataDir> to <dataLogDir>/version-1/ and <dataDir>/version-1 respectively (version-1 sub-directory is created by the upgrade utility). </para></listitem>
+ <listitem><para>Upgrade creates a new version sub-directory <dataDir>/version-2 and <dataLogDir>/version-2</para></listitem>
+ <listitem><para>Upgrade reads the old database from <dataDir>/version-1 and <dataLogDir>/version-1 into the memory and creates a new upgraded snapshot. </para></listitem>
+ <listitem><para>Upgrade writes the new database in <dataDir>/version-2. </para></listitem>
+ </orderedlist>
+
+ <para>Troubleshooting.</para>
+
+ <orderedlist>
+ <listitem><para>In case you start ZooKeeper 3.0 without upgrading from 2.0 on a 2.0 database - the servers will start up with an empty database.
+ This is because the servers assume that <dataDir>/version-2 and <dataLogDir>/version-2 will have the database to start with. Since this will be empty
+ in case of no upgrade, the servers will start with an empty database. In such a case, shutdown the ZooKeeper servers, remove the version-2 directory (remember
+ this will lead to loss of updates after you started 3.0.)
+ and then start the upgrade procedure.</para></listitem>
+ <listitem><para>If the upgrade fails while trying to rename files into the version-1 directory, you should try and move all the files under <dataDir>/version-1
+ and <dataLogDir>/version-1 to <dataDir> and <dataLogDir> respectively. Then try upgrade again.
+ </para>
+ </listitem>
+ <listitem><para> If you do not wish to run with ZooKeeper 3.0 and prefer to run with ZooKeeper 2.0 and have already upgraded - you can run ZooKeeper 2 with
+ the <dataDir> and <dataLogDir> directories changed to <dataDir>/version-1 and <dataLogDir>/version-1. Remember that you will lose all the updates that you made after the upgrade.
+</para></listitem>
+ </orderedlist>
+
</section>
-
</section>
<section id="changes">