|
@@ -1099,8 +1099,22 @@ server.3=zoo3:2888:3888</span>
|
|
non-authenticated UDP-based version of fast leader election, "2"
|
|
non-authenticated UDP-based version of fast leader election, "2"
|
|
corresponds to the authenticated UDP-based version of fast
|
|
corresponds to the authenticated UDP-based version of fast
|
|
leader election, and "3" corresponds to TCP-based version of
|
|
leader election, and "3" corresponds to TCP-based version of
|
|
- fast leader election. Currently, only 0 and 3 are supported, 3
|
|
|
|
- being the default</p>
|
|
|
|
|
|
+ fast leader election. Currently, algorithm 3 is the default</p>
|
|
|
|
+<div class="note">
|
|
|
|
+<div class="label">Note</div>
|
|
|
|
+<div class="content">
|
|
|
|
+
|
|
|
|
+<p> The implementations of leader election
|
|
|
|
+ 1 and 2 are currently not supported, and we have the intention
|
|
|
|
+ of deprecating them in the near future. Implementations 0 and 3 are
|
|
|
|
+ currently supported, and we plan to keep supporting them in the near future.
|
|
|
|
+ To avoid having to support multiple versions of leader election unecessarily,
|
|
|
|
+ we may eventually consider deprecating algorithm 0 as well, but we will plan
|
|
|
|
+ according to the needs of the community.
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+</div>
|
|
|
|
+</div>
|
|
</dd>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
@@ -1207,7 +1221,7 @@ server.3=zoo3:2888:3888</span>
|
|
|
|
|
|
</dl>
|
|
</dl>
|
|
<p></p>
|
|
<p></p>
|
|
-<a name="N103B5"></a><a name="sc_authOptions"></a>
|
|
|
|
|
|
+<a name="N103BA"></a><a name="sc_authOptions"></a>
|
|
<h4>Authentication & Authorization Options</h4>
|
|
<h4>Authentication & Authorization Options</h4>
|
|
<p>The options in this section allow control over
|
|
<p>The options in this section allow control over
|
|
authentication/authorization performed by the service.</p>
|
|
authentication/authorization performed by the service.</p>
|
|
@@ -1241,7 +1255,7 @@ server.3=zoo3:2888:3888</span>
|
|
</dd>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
</dl>
|
|
-<a name="N103D8"></a><a name="Unsafe+Options"></a>
|
|
|
|
|
|
+<a name="N103DD"></a><a name="Unsafe+Options"></a>
|
|
<h4>Unsafe Options</h4>
|
|
<h4>Unsafe Options</h4>
|
|
<p>The following options can be useful, but be careful when you use
|
|
<p>The following options can be useful, but be careful when you use
|
|
them. The risk of each is explained along with the explanation of what
|
|
them. The risk of each is explained along with the explanation of what
|
|
@@ -1286,7 +1300,7 @@ server.3=zoo3:2888:3888</span>
|
|
</dd>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
</dl>
|
|
-<a name="N1040A"></a><a name="sc_zkCommands"></a>
|
|
|
|
|
|
+<a name="N1040F"></a><a name="sc_zkCommands"></a>
|
|
<h3 class="h4">ZooKeeper Commands: The Four Letter Words</h3>
|
|
<h3 class="h4">ZooKeeper Commands: The Four Letter Words</h3>
|
|
<p>ZooKeeper responds to a small set of commands. Each command is
|
|
<p>ZooKeeper responds to a small set of commands. Each command is
|
|
composed of four letters. You issue the commands to ZooKeeper via telnet
|
|
composed of four letters. You issue the commands to ZooKeeper via telnet
|
|
@@ -1407,7 +1421,7 @@ server.3=zoo3:2888:3888</span>
|
|
<pre class="code">$ echo ruok | nc 127.0.0.1 5111
|
|
<pre class="code">$ echo ruok | nc 127.0.0.1 5111
|
|
imok
|
|
imok
|
|
</pre>
|
|
</pre>
|
|
-<a name="N10472"></a><a name="sc_dataFileManagement"></a>
|
|
|
|
|
|
+<a name="N10477"></a><a name="sc_dataFileManagement"></a>
|
|
<h3 class="h4">Data File Management</h3>
|
|
<h3 class="h4">Data File Management</h3>
|
|
<p>ZooKeeper stores its data in a data directory and its transaction
|
|
<p>ZooKeeper stores its data in a data directory and its transaction
|
|
log in a transaction log directory. By default these two directories are
|
|
log in a transaction log directory. By default these two directories are
|
|
@@ -1415,7 +1429,7 @@ imok
|
|
transaction log files in a separate directory than the data files.
|
|
transaction log files in a separate directory than the data files.
|
|
Throughput increases and latency decreases when transaction logs reside
|
|
Throughput increases and latency decreases when transaction logs reside
|
|
on a dedicated log devices.</p>
|
|
on a dedicated log devices.</p>
|
|
-<a name="N1047B"></a><a name="The+Data+Directory"></a>
|
|
|
|
|
|
+<a name="N10480"></a><a name="The+Data+Directory"></a>
|
|
<h4>The Data Directory</h4>
|
|
<h4>The Data Directory</h4>
|
|
<p>This directory has two files in it:</p>
|
|
<p>This directory has two files in it:</p>
|
|
<ul>
|
|
<ul>
|
|
@@ -1461,14 +1475,14 @@ imok
|
|
idempotent nature of its updates. By replaying the transaction log
|
|
idempotent nature of its updates. By replaying the transaction log
|
|
against fuzzy snapshots ZooKeeper gets the state of the system at the
|
|
against fuzzy snapshots ZooKeeper gets the state of the system at the
|
|
end of the log.</p>
|
|
end of the log.</p>
|
|
-<a name="N104B7"></a><a name="The+Log+Directory"></a>
|
|
|
|
|
|
+<a name="N104BC"></a><a name="The+Log+Directory"></a>
|
|
<h4>The Log Directory</h4>
|
|
<h4>The Log Directory</h4>
|
|
<p>The Log Directory contains the ZooKeeper transaction logs.
|
|
<p>The Log Directory contains the ZooKeeper transaction logs.
|
|
Before any update takes place, ZooKeeper ensures that the transaction
|
|
Before any update takes place, ZooKeeper ensures that the transaction
|
|
that represents the update is written to non-volatile storage. A new
|
|
that represents the update is written to non-volatile storage. A new
|
|
log file is started each time a snapshot is begun. The log file's
|
|
log file is started each time a snapshot is begun. The log file's
|
|
suffix is the first zxid written to that log.</p>
|
|
suffix is the first zxid written to that log.</p>
|
|
-<a name="N104C1"></a><a name="sc_filemanagement"></a>
|
|
|
|
|
|
+<a name="N104C6"></a><a name="sc_filemanagement"></a>
|
|
<h4>File Management</h4>
|
|
<h4>File Management</h4>
|
|
<p>The format of snapshot and log files does not change between
|
|
<p>The format of snapshot and log files does not change between
|
|
standalone ZooKeeper servers and different configurations of
|
|
standalone ZooKeeper servers and different configurations of
|
|
@@ -1488,7 +1502,7 @@ imok
|
|
this document for more details on setting a retention policy
|
|
this document for more details on setting a retention policy
|
|
and maintenance of ZooKeeper storage.
|
|
and maintenance of ZooKeeper storage.
|
|
</p>
|
|
</p>
|
|
-<a name="N104D6"></a><a name="sc_commonProblems"></a>
|
|
|
|
|
|
+<a name="N104DB"></a><a name="sc_commonProblems"></a>
|
|
<h3 class="h4">Things to Avoid</h3>
|
|
<h3 class="h4">Things to Avoid</h3>
|
|
<p>Here are some common problems you can avoid by configuring
|
|
<p>Here are some common problems you can avoid by configuring
|
|
ZooKeeper correctly:</p>
|
|
ZooKeeper correctly:</p>
|
|
@@ -1542,7 +1556,7 @@ imok
|
|
</dd>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
</dl>
|
|
-<a name="N104FA"></a><a name="sc_bestPractices"></a>
|
|
|
|
|
|
+<a name="N104FF"></a><a name="sc_bestPractices"></a>
|
|
<h3 class="h4">Best Practices</h3>
|
|
<h3 class="h4">Best Practices</h3>
|
|
<p>For best results, take note of the following list of good
|
|
<p>For best results, take note of the following list of good
|
|
Zookeeper practices:</p>
|
|
Zookeeper practices:</p>
|