releasenotes.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta content="Apache Forrest" name="Generator">
  6. <meta name="Forrest-version" content="0.8">
  7. <meta name="Forrest-skin-name" content="pelt">
  8. <title>ZooKeeper 3.0.0 Release Notes</title>
  9. <link type="text/css" href="skin/basic.css" rel="stylesheet">
  10. <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
  11. <link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
  12. <link type="text/css" href="skin/profile.css" rel="stylesheet">
  13. <script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
  14. <link rel="shortcut icon" href="images/favicon.ico">
  15. </head>
  16. <body onload="init()">
  17. <script type="text/javascript">ndeSetTextSize();</script>
  18. <div id="top">
  19. <!--+
  20. |breadtrail
  21. +-->
  22. <div class="breadtrail">
  23. <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/zookeeper/">ZooKeeper</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  24. </div>
  25. <!--+
  26. |header
  27. +-->
  28. <div class="header">
  29. <!--+
  30. |start group logo
  31. +-->
  32. <div class="grouplogo">
  33. <a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
  34. </div>
  35. <!--+
  36. |end group logo
  37. +-->
  38. <!--+
  39. |start Project Logo
  40. +-->
  41. <div class="projectlogo">
  42. <a href="http://hadoop.apache.org/zookeeper/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="The Hadoop database"></a>
  43. </div>
  44. <!--+
  45. |end Project Logo
  46. +-->
  47. <!--+
  48. |start Search
  49. +-->
  50. <div class="searchbox">
  51. <form action="http://www.google.com/search" method="get" class="roundtopsmall">
  52. <input value="hadoop.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp;
  53. <input name="Search" value="Search" type="submit">
  54. </form>
  55. </div>
  56. <!--+
  57. |end search
  58. +-->
  59. <!--+
  60. |start Tabs
  61. +-->
  62. <ul id="tabs">
  63. <li>
  64. <a class="unselected" href="http://hadoop.apache.org/zookeeper/">Project</a>
  65. </li>
  66. <li>
  67. <a class="unselected" href="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
  68. </li>
  69. <li class="current">
  70. <a class="selected" href="index.html">ZooKeeper Documentation</a>
  71. </li>
  72. </ul>
  73. <!--+
  74. |end Tabs
  75. +-->
  76. </div>
  77. </div>
  78. <div id="main">
  79. <div id="publishedStrip">
  80. <!--+
  81. |start Subtabs
  82. +-->
  83. <div id="level2tabs"></div>
  84. <!--+
  85. |end Endtabs
  86. +-->
  87. <script type="text/javascript"><!--
  88. document.write("Last Published: " + document.lastModified);
  89. // --></script>
  90. </div>
  91. <!--+
  92. |breadtrail
  93. +-->
  94. <div class="breadtrail">
  95. &nbsp;
  96. </div>
  97. <!--+
  98. |start Menu, mainarea
  99. +-->
  100. <!--+
  101. |start Menu
  102. +-->
  103. <div id="menu">
  104. <div onclick="SwitchMenu('menu_selected_1.1', 'skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Overview</div>
  105. <div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
  106. <div class="menuitem">
  107. <a href="index.html">Welcome</a>
  108. </div>
  109. <div class="menuitem">
  110. <a href="zookeeperOver.html">Overview</a>
  111. </div>
  112. <div class="menuitem">
  113. <a href="zookeeperStarted.html">Getting Started</a>
  114. </div>
  115. <div class="menupage">
  116. <div class="menupagetitle">Release Notes</div>
  117. </div>
  118. </div>
  119. <div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Developer</div>
  120. <div id="menu_1.2" class="menuitemgroup">
  121. <div class="menuitem">
  122. <a href="api/index.html">API Docs</a>
  123. </div>
  124. <div class="menuitem">
  125. <a href="zookeeperProgrammers.html">Programmer's Guide</a>
  126. </div>
  127. <div class="menuitem">
  128. <a href="javaExample.html">Java Example</a>
  129. </div>
  130. <div class="menuitem">
  131. <a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a>
  132. </div>
  133. <div class="menuitem">
  134. <a href="recipes.html">Recipes</a>
  135. </div>
  136. </div>
  137. <div onclick="SwitchMenu('menu_1.3', 'skin/')" id="menu_1.3Title" class="menutitle">Admin &amp; Ops</div>
  138. <div id="menu_1.3" class="menuitemgroup">
  139. <div class="menuitem">
  140. <a href="zookeeperAdmin.html">Administrator's Guide</a>
  141. </div>
  142. </div>
  143. <div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Contributor</div>
  144. <div id="menu_1.4" class="menuitemgroup">
  145. <div class="menuitem">
  146. <a href="zookeeperInternals.html">ZooKeeper Internals</a>
  147. </div>
  148. </div>
  149. <div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Informal Documentation</div>
  150. <div id="menu_1.5" class="menuitemgroup">
  151. <div class="menuitem">
  152. <a href="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
  153. </div>
  154. <div class="menuitem">
  155. <a href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ">FAQ</a>
  156. </div>
  157. <div class="menuitem">
  158. <a href="http://hadoop.apache.org/zookeeper/mailing_lists.html">Mailing Lists</a>
  159. </div>
  160. <div class="menuitem">
  161. <a href="zookeeperOtherInfo.html">Other Info</a>
  162. </div>
  163. </div>
  164. <div id="credit"></div>
  165. <div id="roundbottom">
  166. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  167. <!--+
  168. |alternative credits
  169. +-->
  170. <div id="credit2"></div>
  171. </div>
  172. <!--+
  173. |end Menu
  174. +-->
  175. <!--+
  176. |start content
  177. +-->
  178. <div id="content">
  179. <div title="Portable Document Format" class="pdflink">
  180. <a class="dida" href="releasenotes.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  181. PDF</a>
  182. </div>
  183. <h1>ZooKeeper 3.0.0 Release Notes</h1>
  184. <div id="minitoc-area">
  185. <ul class="minitoc">
  186. <li>
  187. <a href="#migration">Migration Instructions when Upgrading to 3.0.0</a>
  188. <ul class="minitoc">
  189. <li>
  190. <a href="#migration_code">Migrating Client Code</a>
  191. <ul class="minitoc">
  192. <li>
  193. <a href="#Java+API">Java API</a>
  194. </li>
  195. <li>
  196. <a href="#C+API">C API</a>
  197. </li>
  198. </ul>
  199. </li>
  200. <li>
  201. <a href="#migration_data">Migrating Server Data</a>
  202. </li>
  203. </ul>
  204. </li>
  205. <li>
  206. <a href="#changes">Changes Since ZooKeeper 2.2.1</a>
  207. </li>
  208. </ul>
  209. </div>
  210. <p>
  211. These release notes include new developer and user facing incompatibilities, features, and major improvements.
  212. </p>
  213. <ul>
  214. <li>
  215. <p>
  216. <a href="#migration">Migration Instructions</a>
  217. </p>
  218. </li>
  219. <li>
  220. <p>
  221. <a href="#changes">Changes</a>
  222. </p>
  223. </li>
  224. </ul>
  225. <a name="N1001B"></a><a name="migration"></a>
  226. <h2 class="h3">Migration Instructions when Upgrading to 3.0.0</h2>
  227. <div class="section">
  228. <p>
  229. <em>You should only have to read this section if you are upgrading from a previous version of ZooKeeper to version 3.0.0, otw skip down to <a href="#changes">changes</a></em>
  230. </p>
  231. <p>
  232. A small number of changes in this release have resulted in non-backward compatible Zookeeper client user code and server instance data. The following instructions provide details on how to migrate code and date from version 2.2.1 to version 3.0.0.
  233. </p>
  234. <p>
  235. Note: ZooKeeper increments the major version number (major.minor.fix) when backward incompatible changes are made to the source base. As part of the migration from SourceForge we changed the package structure (com.yahoo.zookeeper.* to org.apache.zookeeper.*) and felt it was a good time to incorporate some changes that we had been withholding. As a result the following will be required when migrating from 2.2.1 to 3.0.0 version of ZooKeeper.
  236. </p>
  237. <ul>
  238. <li>
  239. <p>
  240. <a href="#migration_code">Migrating Client Code</a>
  241. </p>
  242. </li>
  243. <li>
  244. <p>
  245. <a href="#migration_data">Migrating Server Data</a>
  246. </p>
  247. </li>
  248. </ul>
  249. <a name="N1003F"></a><a name="migration_code"></a>
  250. <h3 class="h4">Migrating Client Code</h3>
  251. <a name="N10045"></a><a name="Java+API"></a>
  252. <h4>Java API</h4>
  253. <ol>
  254. <li>
  255. <p>The java package structure has changed from <strong>com.yahoo.zookeeper*</strong> to <strong>org.apache.zookeeper*</strong>. This will probably effect all of your java code which makes use of ZooKeeper APIs (typically import statements)</p>
  256. </li>
  257. <li>
  258. <p>A number of constants used in the client ZooKeeper API were re-specified using enums (rather than ints). See <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-7">ZOOKEEPER-7</a>, <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-132">ZOOKEEPER-132</a> and <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-139">ZOOKEEPER-139</a> for full details</p>
  259. </li>
  260. <li>
  261. <p>
  262. <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-18">ZOOKEEPER-18</a> removed KeeperStateChanged, use KeeperStateDisconnected instead</p>
  263. </li>
  264. </ol>
  265. <p>
  266. Also see <a href="http://hadoop.apache.org/zookeeper/docs/current/api/index.html">the current java API</a>
  267. </p>
  268. <a name="N10077"></a><a name="C+API"></a>
  269. <h4>C API</h4>
  270. <ol>
  271. <li>
  272. <p>A number of constants used in the client ZooKeeper API were renamed in order to reduce namespace collision, see <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-6">ZOOKEEPER-6</a> for full details</p>
  273. </li>
  274. </ol>
  275. <a name="N1008A"></a><a name="migration_data"></a>
  276. <h3 class="h4">Migrating Server Data</h3>
  277. <p>
  278. The following issues resulted in changes to the on-disk data format (the snapshot and transaction log files contained within the ZK data directory) and require a migration utility to be run.
  279. </p>
  280. <ul>
  281. <li>
  282. <p>
  283. <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-27">ZOOKEEPER-27 Unique DB identifiers for servers and clients</a>
  284. </p>
  285. </li>
  286. <li>
  287. <p>
  288. <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-32">ZOOKEEPER-32 CRCs for ZooKeeper data</a>
  289. </p>
  290. </li>
  291. <li>
  292. <p>
  293. <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-33">ZOOKEEPER-33 Better ACL management</a>
  294. </p>
  295. </li>
  296. <li>
  297. <p>
  298. <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-38">ZOOKEEPER-38 headers (version+) in log/snap files</a>
  299. </p>
  300. </li>
  301. </ul>
  302. <p>
  303. <strong>The following must be run once, and only once, when upgrading the ZooKeeper server instances to version 3.0.0.</strong>
  304. </p>
  305. <div class="note">
  306. <div class="label">Note</div>
  307. <div class="content">
  308. <p>
  309. The &lt;dataLogDir&gt; and &lt;dataDir&gt; directories referenced
  310. below are specified by the <em>dataLogDir</em>
  311. and <em>dataLogDir</em> specification in your
  312. ZooKeeper config file
  313. respectively. <em>dataLogDir</em> defaults to the
  314. value of <em>dataDir</em> if not specified explicitly
  315. in the ZooKeeper server config file (in which case provide the
  316. same directory for both parameters to the upgrade utility).
  317. </p>
  318. </div>
  319. </div>
  320. <ol>
  321. <li>
  322. <p>Shutdown the ZooKeeper server cluster.</p>
  323. </li>
  324. <li>
  325. <p>Backup your &lt;dataLogDir&gt; and &lt;dataDir&gt; directories</p>
  326. </li>
  327. <li>
  328. <p>Run upgrade using</p>
  329. <ul>
  330. <li>
  331. <p>
  332. <span class="codefrag computeroutput">bin/zkServer.sh upgrade &lt;dataLogDir&gt; &lt;dataDir&gt;</span>
  333. </p>
  334. </li>
  335. </ul>
  336. <p>or</p>
  337. <ul>
  338. <li>
  339. <p>
  340. <span class="codefrag computeroutput">java -classpath pathtolog4j:pathtozookeeper.jar UpgradeMain &lt;dataLogDir&gt; &lt;dataDir&gt;</span>
  341. </p>
  342. </li>
  343. </ul>
  344. <p>where &lt;dataLogDir&gt; is the directory where all transaction logs (log.*) are stored. &lt;dataDir&gt; is the directory where all the snapshots (snapshot.*) are stored.</p>
  345. </li>
  346. <li>
  347. <p>Restart the cluster. </p>
  348. </li>
  349. </ol>
  350. <p>
  351. If you have any failure during the upgrade procedure keep reading to sanitize your database.
  352. </p>
  353. <p>This is how upgrade works in ZooKeeper. This will help you troubleshoot in case you have problems while upgrading</p>
  354. <ol>
  355. <li>
  356. <p>Upgrade moves files from &lt;dataLogDir&gt; and &lt;dataDir&gt; to &lt;dataLogDir&gt;/version-1/ and &lt;dataDir&gt;/version-1 respectively (version-1 sub-directory is created by the upgrade utility). </p>
  357. </li>
  358. <li>
  359. <p>Upgrade creates a new version sub-directory &lt;dataDir&gt;/version-2 and &lt;dataLogDir&gt;/version-2</p>
  360. </li>
  361. <li>
  362. <p>Upgrade reads the old database from &lt;dataDir&gt;/version-1 and &lt;dataLogDir&gt;/version-1 into the memory and creates a new upgraded snapshot. </p>
  363. </li>
  364. <li>
  365. <p>Upgrade writes the new database in &lt;dataDir&gt;/version-2. </p>
  366. </li>
  367. </ol>
  368. <p>Troubleshooting.</p>
  369. <ol>
  370. <li>
  371. <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.
  372. This is because the servers assume that &lt;dataDir&gt;/version-2 and &lt;dataLogDir&gt;/version-2 will have the database to start with. Since this will be empty
  373. 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
  374. this will lead to loss of updates after you started 3.0.)
  375. and then start the upgrade procedure.</p>
  376. </li>
  377. <li>
  378. <p>If the upgrade fails while trying to rename files into the version-1 directory, you should try and move all the files under &lt;dataDir&gt;/version-1
  379. and &lt;dataLogDir&gt;/version-1 to &lt;dataDir&gt; and &lt;dataLogDir&gt; respectively. Then try upgrade again.
  380. </p>
  381. </li>
  382. <li>
  383. <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
  384. the &lt;dataDir&gt; and &lt;dataLogDir&gt; directories changed to &lt;dataDir&gt;/version-1 and &lt;dataLogDir&gt;/version-1. Remember that you will lose all the updates that you made after the upgrade.
  385. </p>
  386. </li>
  387. </ol>
  388. </div>
  389. <a name="N10120"></a><a name="changes"></a>
  390. <h2 class="h3">Changes Since ZooKeeper 2.2.1</h2>
  391. <div class="section">
  392. <p>
  393. Version 2.2.1 code, documentation, binaries, etc... are still accessible on <a href="http://sourceforge.net/projects/zookeeper">SourceForge</a>
  394. </p>
  395. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  396. <caption>Changes Since ZooKeeper 2.2.1</caption>
  397. <title>Changes Since ZooKeeper 2.2.1</title>
  398. <tr>
  399. <th>Issue</th>
  400. <th>Notes</th>
  401. </tr>
  402. <tr>
  403. <td>
  404. <a href="https://issues.apache.org/jira/browse/ZOOKEEPER-1">
  405. ZOOKEEPER-1</a>
  406. </td>
  407. <td>
  408. notes, placeholder - TBD during release process
  409. </td>
  410. </tr>
  411. </table>
  412. </div>
  413. <p align="right">
  414. <font size="-2"></font>
  415. </p>
  416. </div>
  417. <!--+
  418. |end content
  419. +-->
  420. <div class="clearboth">&nbsp;</div>
  421. </div>
  422. <div id="footer">
  423. <!--+
  424. |start bottomstrip
  425. +-->
  426. <div class="lastmodified">
  427. <script type="text/javascript"><!--
  428. document.write("Last Published: " + document.lastModified);
  429. // --></script>
  430. </div>
  431. <div class="copyright">
  432. Copyright &copy;
  433. 2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  434. </div>
  435. <!--+
  436. |end bottomstrip
  437. +-->
  438. </div>
  439. </body>
  440. </html>