zookeeperStarted.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  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.9">
  7. <meta name="Forrest-skin-name" content="pelt">
  8. <title>ZooKeeper Getting Started Guide</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://zookeeper.apache.org/">ZooKeeper</a> &gt; <a href="http://zookeeper.apache.org/">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://zookeeper.apache.org/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="ZooKeeper: distributed coordination"></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="zookeeper.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://zookeeper.apache.org/">Project</a>
  65. </li>
  66. <li>
  67. <a class="unselected" href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/">Wiki</a>
  68. </li>
  69. <li class="current">
  70. <a class="selected" href="index.html">ZooKeeper 3.4 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="menupage">
  113. <div class="menupagetitle">Getting Started</div>
  114. </div>
  115. <div class="menuitem">
  116. <a href="releasenotes.html">Release Notes</a>
  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">BookKeeper</div>
  138. <div id="menu_1.3" class="menuitemgroup">
  139. <div class="menuitem">
  140. <a href="bookkeeperStarted.html">Getting started</a>
  141. </div>
  142. <div class="menuitem">
  143. <a href="bookkeeperOverview.html">Overview</a>
  144. </div>
  145. <div class="menuitem">
  146. <a href="bookkeeperConfig.html">Setup guide</a>
  147. </div>
  148. <div class="menuitem">
  149. <a href="bookkeeperProgrammer.html">Programmer's guide</a>
  150. </div>
  151. </div>
  152. <div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Admin &amp; Ops</div>
  153. <div id="menu_1.4" class="menuitemgroup">
  154. <div class="menuitem">
  155. <a href="zookeeperAdmin.html">Administrator's Guide</a>
  156. </div>
  157. <div class="menuitem">
  158. <a href="zookeeperQuotas.html">Quota Guide</a>
  159. </div>
  160. <div class="menuitem">
  161. <a href="zookeeperJMX.html">JMX</a>
  162. </div>
  163. <div class="menuitem">
  164. <a href="zookeeperObservers.html">Observers Guide</a>
  165. </div>
  166. </div>
  167. <div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Contributor</div>
  168. <div id="menu_1.5" class="menuitemgroup">
  169. <div class="menuitem">
  170. <a href="zookeeperInternals.html">ZooKeeper Internals</a>
  171. </div>
  172. </div>
  173. <div onclick="SwitchMenu('menu_1.6', 'skin/')" id="menu_1.6Title" class="menutitle">Miscellaneous</div>
  174. <div id="menu_1.6" class="menuitemgroup">
  175. <div class="menuitem">
  176. <a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER">Wiki</a>
  177. </div>
  178. <div class="menuitem">
  179. <a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ">FAQ</a>
  180. </div>
  181. <div class="menuitem">
  182. <a href="http://zookeeper.apache.org/mailing_lists.html">Mailing Lists</a>
  183. </div>
  184. </div>
  185. <div id="credit"></div>
  186. <div id="roundbottom">
  187. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  188. <!--+
  189. |alternative credits
  190. +-->
  191. <div id="credit2"></div>
  192. </div>
  193. <!--+
  194. |end Menu
  195. +-->
  196. <!--+
  197. |start content
  198. +-->
  199. <div id="content">
  200. <div title="Portable Document Format" class="pdflink">
  201. <a class="dida" href="zookeeperStarted.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  202. PDF</a>
  203. </div>
  204. <h1>ZooKeeper Getting Started Guide</h1>
  205. <div id="front-matter">
  206. <div id="minitoc-area">
  207. <ul class="minitoc">
  208. <li>
  209. <a href="#ch_GettingStarted">Getting Started: Coordinating Distributed Applications with
  210. ZooKeeper</a>
  211. <ul class="minitoc">
  212. <li>
  213. <a href="#sc_Prerequisites">Pre-requisites</a>
  214. </li>
  215. <li>
  216. <a href="#sc_Download">Download</a>
  217. </li>
  218. <li>
  219. <a href="#sc_InstallingSingleMode">Standalone Operation</a>
  220. </li>
  221. <li>
  222. <a href="#sc_FileManagement">Managing ZooKeeper Storage</a>
  223. </li>
  224. <li>
  225. <a href="#sc_ConnectingToZooKeeper">Connecting to ZooKeeper</a>
  226. </li>
  227. <li>
  228. <a href="#sc_ProgrammingToZooKeeper">Programming to ZooKeeper</a>
  229. </li>
  230. <li>
  231. <a href="#sc_RunningReplicatedZooKeeper">Running Replicated ZooKeeper</a>
  232. </li>
  233. <li>
  234. <a href="#Other+Optimizations">Other Optimizations</a>
  235. </li>
  236. </ul>
  237. </li>
  238. </ul>
  239. </div>
  240. </div>
  241. <a name="ch_GettingStarted"></a>
  242. <h2 class="h3">Getting Started: Coordinating Distributed Applications with
  243. ZooKeeper</h2>
  244. <div class="section">
  245. <p>This document contains information to get you started quickly with
  246. ZooKeeper. It is aimed primarily at developers hoping to try it out, and
  247. contains simple installation instructions for a single ZooKeeper server, a
  248. few commands to verify that it is running, and a simple programming
  249. example. Finally, as a convenience, there are a few sections regarding
  250. more complicated installations, for example running replicated
  251. deployments, and optimizing the transaction log. However for the complete
  252. instructions for commercial deployments, please refer to the <a href="zookeeperAdmin.html">ZooKeeper
  253. Administrator's Guide</a>.</p>
  254. <a name="sc_Prerequisites"></a>
  255. <h3 class="h4">Pre-requisites</h3>
  256. <p>See <a href="zookeeperAdmin.html#sc_systemReq">
  257. System Requirements</a> in the Admin guide.</p>
  258. <a name="sc_Download"></a>
  259. <h3 class="h4">Download</h3>
  260. <p>To get a ZooKeeper distribution, download a recent
  261. <a href="http://zookeeper.apache.org/releases.html">
  262. stable</a> release from one of the Apache Download
  263. Mirrors.</p>
  264. <a name="sc_InstallingSingleMode"></a>
  265. <h3 class="h4">Standalone Operation</h3>
  266. <p>Setting up a ZooKeeper server in standalone mode is
  267. straightforward. The server is contained in a single JAR file,
  268. so installation consists of creating a configuration.</p>
  269. <p>Once you've downloaded a stable ZooKeeper release unpack
  270. it and cd to the root</p>
  271. <p>To start ZooKeeper you need a configuration file. Here is a sample,
  272. create it in <strong>conf/zoo.cfg</strong>:</p>
  273. <pre class="code">
  274. tickTime=2000
  275. dataDir=/var/lib/zookeeper
  276. clientPort=2181
  277. </pre>
  278. <p>This file can be called anything, but for the sake of this
  279. discussion call
  280. it <strong>conf/zoo.cfg</strong>. Change the
  281. value of <strong>dataDir</strong> to specify an
  282. existing (empty to start with) directory. Here are the meanings
  283. for each of the fields:</p>
  284. <dl>
  285. <dt>
  286. <term>
  287. <strong>tickTime</strong>
  288. </term>
  289. </dt>
  290. <dd>
  291. <p>the basic time unit in milliseconds used by ZooKeeper. It is
  292. used to do heartbeats and the minimum session timeout will be
  293. twice the tickTime.</p>
  294. </dd>
  295. </dl>
  296. <dl>
  297. <dt>
  298. <term>
  299. <strong>dataDir</strong>
  300. </term>
  301. </dt>
  302. <dd>
  303. <p>the location to store the in-memory database snapshots and,
  304. unless specified otherwise, the transaction log of updates to the
  305. database.</p>
  306. </dd>
  307. <dt>
  308. <term>
  309. <strong>clientPort</strong>
  310. </term>
  311. </dt>
  312. <dd>
  313. <p>the port to listen for client connections</p>
  314. </dd>
  315. </dl>
  316. <p>Now that you created the configuration file, you can start
  317. ZooKeeper:</p>
  318. <pre class="code">bin/zkServer.sh start</pre>
  319. <p>ZooKeeper logs messages using log4j -- more detail
  320. available in the
  321. <a href="zookeeperProgrammers.html#Logging">Logging</a>
  322. section of the Programmer's Guide. You will see log messages
  323. coming to the console (default) and/or a log file depending on
  324. the log4j configuration.</p>
  325. <p>The steps outlined here run ZooKeeper in standalone mode. There is
  326. no replication, so if ZooKeeper process fails, the service will go down.
  327. This is fine for most development situations, but to run ZooKeeper in
  328. replicated mode, please see <a href="#sc_RunningReplicatedZooKeeper">Running Replicated
  329. ZooKeeper</a>.</p>
  330. <a name="sc_FileManagement"></a>
  331. <h3 class="h4">Managing ZooKeeper Storage</h3>
  332. <p>For long running production systems ZooKeeper storage must
  333. be managed externally (dataDir and logs). See the section on
  334. <a href="zookeeperAdmin.html#sc_maintenance">maintenance</a> for
  335. more details.</p>
  336. <a name="sc_ConnectingToZooKeeper"></a>
  337. <h3 class="h4">Connecting to ZooKeeper</h3>
  338. <pre class="code">$ bin/zkCli.sh -server 127.0.0.1:2181</pre>
  339. <p>This lets you perform simple, file-like operations.</p>
  340. <p>Once you have connected, you should see something like:
  341. </p>
  342. <pre class="code">
  343. Connecting to localhost:2181
  344. log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
  345. log4j:WARN Please initialize the log4j system properly.
  346. Welcome to ZooKeeper!
  347. JLine support is enabled
  348. [zkshell: 0]
  349. </pre>
  350. <p>
  351. From the shell, type <span class="codefrag command">help</span> to get a listing of commands that can be executed from the client, as in:
  352. </p>
  353. <pre class="code">
  354. [zkshell: 0] help
  355. ZooKeeper host:port cmd args
  356. get path [watch]
  357. ls path [watch]
  358. set path data [version]
  359. delquota [-n|-b] path
  360. quit
  361. printwatches on|off
  362. createpath data acl
  363. stat path [watch]
  364. listquota path
  365. history
  366. setAcl path acl
  367. getAcl path
  368. sync path
  369. redo cmdno
  370. addauth scheme auth
  371. delete path [version]
  372. setquota -n|-b val path
  373. </pre>
  374. <p>From here, you can try a few simple commands to get a feel for this simple command line interface. First, start by issuing the list command, as
  375. in <span class="codefrag command">ls</span>, yielding:
  376. </p>
  377. <pre class="code">
  378. [zkshell: 8] ls /
  379. [zookeeper]
  380. </pre>
  381. <p>Next, create a new znode by running <span class="codefrag command">create /zk_test my_data</span>. This creates a new znode and associates the string "my_data" with the node.
  382. You should see:</p>
  383. <pre class="code">
  384. [zkshell: 9] create /zk_test my_data
  385. Created /zk_test
  386. </pre>
  387. <p> Issue another <span class="codefrag command">ls /</span> command to see what the directory looks like:
  388. </p>
  389. <pre class="code">
  390. [zkshell: 11] ls /
  391. [zookeeper, zk_test]
  392. </pre>
  393. <p>
  394. Notice that the zk_test directory has now been created.
  395. </p>
  396. <p>Next, verify that the data was associated with the znode by running the <span class="codefrag command">get</span> command, as in:
  397. </p>
  398. <pre class="code">
  399. [zkshell: 12] get /zk_test
  400. my_data
  401. cZxid = 5
  402. ctime = Fri Jun 05 13:57:06 PDT 2009
  403. mZxid = 5
  404. mtime = Fri Jun 05 13:57:06 PDT 2009
  405. pZxid = 5
  406. cversion = 0
  407. dataVersion = 0
  408. aclVersion = 0
  409. ephemeralOwner = 0
  410. dataLength = 7
  411. numChildren = 0
  412. </pre>
  413. <p>We can change the data associated with zk_test by issuing the <span class="codefrag command">set</span> command, as in:
  414. </p>
  415. <pre class="code">
  416. [zkshell: 14] set /zk_test junk
  417. cZxid = 5
  418. ctime = Fri Jun 05 13:57:06 PDT 2009
  419. mZxid = 6
  420. mtime = Fri Jun 05 14:01:52 PDT 2009
  421. pZxid = 5
  422. cversion = 0
  423. dataVersion = 1
  424. aclVersion = 0
  425. ephemeralOwner = 0
  426. dataLength = 4
  427. numChildren = 0
  428. [zkshell: 15] get /zk_test
  429. junk
  430. cZxid = 5
  431. ctime = Fri Jun 05 13:57:06 PDT 2009
  432. mZxid = 6
  433. mtime = Fri Jun 05 14:01:52 PDT 2009
  434. pZxid = 5
  435. cversion = 0
  436. dataVersion = 1
  437. aclVersion = 0
  438. ephemeralOwner = 0
  439. dataLength = 4
  440. numChildren = 0
  441. </pre>
  442. <p>
  443. (Notice we did a <span class="codefrag command">get</span> after setting the data and it did, indeed, change.</p>
  444. <p>Finally, let's <span class="codefrag command">delete</span> the node by issuing:
  445. </p>
  446. <pre class="code">
  447. [zkshell: 16] delete /zk_test
  448. [zkshell: 17] ls /
  449. [zookeeper]
  450. [zkshell: 18]
  451. </pre>
  452. <p>That's it for now. To explore more, continue with the rest of this document and see the <a href="zookeeperProgrammers.html">Programmer's Guide</a>. </p>
  453. <a name="sc_ProgrammingToZooKeeper"></a>
  454. <h3 class="h4">Programming to ZooKeeper</h3>
  455. <p>ZooKeeper has a Java bindings and C bindings. They are
  456. functionally equivalent. The C bindings exist in two variants: single
  457. threaded and multi-threaded. These differ only in how the messaging loop
  458. is done. For more information, see the <a href="zookeeperProgrammers.html#ch_programStructureWithExample">Programming
  459. Examples in the ZooKeeper Programmer's Guide</a> for
  460. sample code using of the different APIs.</p>
  461. <a name="sc_RunningReplicatedZooKeeper"></a>
  462. <h3 class="h4">Running Replicated ZooKeeper</h3>
  463. <p>Running ZooKeeper in standalone mode is convenient for evaluation,
  464. some development, and testing. But in production, you should run
  465. ZooKeeper in replicated mode. A replicated group of servers in the same
  466. application is called a <em>quorum</em>, and in replicated
  467. mode, all servers in the quorum have copies of the same configuration
  468. file.</p>
  469. <div class="note">
  470. <div class="label">Note</div>
  471. <div class="content">
  472. <p>
  473. For replicated mode, a minimum of three servers are required,
  474. and it is strongly recommended that you have an odd number of
  475. servers. If you only have two servers, then you are in a
  476. situation where if one of them fails, there are not enough
  477. machines to form a majority quorum. Two servers is inherently
  478. <strong>less</strong>
  479. stable than a single server, because there are two single
  480. points of failure.
  481. </p>
  482. </div>
  483. </div>
  484. <p>
  485. The required
  486. <strong>conf/zoo.cfg</strong>
  487. file for replicated mode is similar to the one used in standalone
  488. mode, but with a few differences. Here is an example:
  489. </p>
  490. <pre class="code">
  491. tickTime=2000
  492. dataDir=/var/lib/zookeeper
  493. clientPort=2181
  494. initLimit=5
  495. syncLimit=2
  496. server.1=zoo1:2888:3888
  497. server.2=zoo2:2888:3888
  498. server.3=zoo3:2888:3888
  499. </pre>
  500. <p>The new entry, <strong>initLimit</strong> is
  501. timeouts ZooKeeper uses to limit the length of time the ZooKeeper
  502. servers in quorum have to connect to a leader. The entry <strong>syncLimit</strong> limits how far out of date a server can
  503. be from a leader.</p>
  504. <p>With both of these timeouts, you specify the unit of time using
  505. <strong>tickTime</strong>. In this example, the timeout
  506. for initLimit is 5 ticks at 2000 milleseconds a tick, or 10
  507. seconds.</p>
  508. <p>The entries of the form <em>server.X</em> list the
  509. servers that make up the ZooKeeper service. When the server starts up,
  510. it knows which server it is by looking for the file
  511. <em>myid</em> in the data directory. That file has the
  512. contains the server number, in ASCII.</p>
  513. <p>Finally, note the two port numbers after each server
  514. name: " 2888" and "3888". Peers use the former port to connect
  515. to other peers. Such a connection is necessary so that peers
  516. can communicate, for example, to agree upon the order of
  517. updates. More specifically, a ZooKeeper server uses this port
  518. to connect followers to the leader. When a new leader arises, a
  519. follower opens a TCP connection to the leader using this
  520. port. Because the default leader election also uses TCP, we
  521. currently require another port for leader election. This is the
  522. second port in the server entry.
  523. </p>
  524. <div class="note">
  525. <div class="label">Note</div>
  526. <div class="content">
  527. <p>If you want to test multiple servers on a single
  528. machine, specify the servername
  529. as <em>localhost</em> with unique quorum &amp;
  530. leader election ports (i.e. 2888:3888, 2889:3889, 2890:3890 in
  531. the example above) for each server.X in that server's config
  532. file. Of course separate <em>dataDir</em>s and
  533. distinct <em>clientPort</em>s are also necessary
  534. (in the above replicated example, running on a
  535. single <em>localhost</em>, you would still have
  536. three config files).</p>
  537. <p>Please be aware that setting up multiple servers on a single
  538. machine will not create any redundancy. If something were to
  539. happen which caused the machine to die, all of the zookeeper
  540. servers would be offline. Full redundancy requires that each
  541. server have its own machine. It must be a completely separate
  542. physical server. Multiple virtual machines on the same physical
  543. host are still vulnerable to the complete failure of that host.</p>
  544. </div>
  545. </div>
  546. <a name="Other+Optimizations"></a>
  547. <h3 class="h4">Other Optimizations</h3>
  548. <p>There are a couple of other configuration parameters that can
  549. greatly increase performance:</p>
  550. <ul>
  551. <li>
  552. <p>To get low latencies on updates it is important to
  553. have a dedicated transaction log directory. By default
  554. transaction logs are put in the same directory as the data
  555. snapshots and <em>myid</em> file. The dataLogDir
  556. parameters indicates a different directory to use for the
  557. transaction logs.</p>
  558. </li>
  559. <li>
  560. <p>
  561. <em>[tbd: what is the other config param?]</em>
  562. </p>
  563. </li>
  564. </ul>
  565. </div>
  566. <p align="right">
  567. <font size="-2"></font>
  568. </p>
  569. </div>
  570. <!--+
  571. |end content
  572. +-->
  573. <div class="clearboth">&nbsp;</div>
  574. </div>
  575. <div id="footer">
  576. <!--+
  577. |start bottomstrip
  578. +-->
  579. <div class="lastmodified">
  580. <script type="text/javascript"><!--
  581. document.write("Last Published: " + document.lastModified);
  582. // --></script>
  583. </div>
  584. <div class="copyright">
  585. Copyright &copy;
  586. <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  587. </div>
  588. <!--+
  589. |end bottomstrip
  590. +-->
  591. </div>
  592. </body>
  593. </html>