|
@@ -269,6 +269,9 @@ document.write("Last Published: " + document.lastModified);
|
|
|
<a href="#ch_guideToZkOperations">Building Blocks: A Guide to ZooKeeper Operations</a>
|
|
|
<ul class="minitoc">
|
|
|
<li>
|
|
|
+<a href="#sc_errorsZk">Handling Errors</a>
|
|
|
+</li>
|
|
|
+<li>
|
|
|
<a href="#sc_connectingToZk">Connecting to ZooKeeper</a>
|
|
|
</li>
|
|
|
<li>
|
|
@@ -1716,25 +1719,28 @@ int main(int argc, char argv) {
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
-<a name="N105F1"></a><a name="sc_connectingToZk"></a>
|
|
|
+<a name="N105F1"></a><a name="sc_errorsZk"></a>
|
|
|
+<h3 class="h4">Handling Errors</h3>
|
|
|
+<p>Both the Java and C client bindings may report errors. The Java client binding does so by throwing KeeperException, calling code() on the exception will return the specific error code. The C client binding returns an error code as defined in the enum ZOO_ERRORS. API callbacks indicate result code for both language bindings. See the API documentation (javadoc for Java, doxygen for C) for full details on the possible errors and their meaning.</p>
|
|
|
+<a name="N105FB"></a><a name="sc_connectingToZk"></a>
|
|
|
<h3 class="h4">Connecting to ZooKeeper</h3>
|
|
|
<p></p>
|
|
|
-<a name="N105FA"></a><a name="sc_readOps"></a>
|
|
|
+<a name="N10604"></a><a name="sc_readOps"></a>
|
|
|
<h3 class="h4">Read Operations</h3>
|
|
|
<p></p>
|
|
|
-<a name="N10603"></a><a name="sc_writeOps"></a>
|
|
|
+<a name="N1060D"></a><a name="sc_writeOps"></a>
|
|
|
<h3 class="h4">Write Operations</h3>
|
|
|
<p></p>
|
|
|
-<a name="N1060C"></a><a name="sc_handlingWatches"></a>
|
|
|
+<a name="N10616"></a><a name="sc_handlingWatches"></a>
|
|
|
<h3 class="h4">Handling Watches</h3>
|
|
|
<p></p>
|
|
|
-<a name="N10615"></a><a name="sc_miscOps"></a>
|
|
|
+<a name="N1061F"></a><a name="sc_miscOps"></a>
|
|
|
<h3 class="h4">Miscelleaneous ZooKeeper Operations</h3>
|
|
|
<p></p>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
-<a name="N1061F"></a><a name="ch_programStructureWithExample"></a>
|
|
|
+<a name="N10629"></a><a name="ch_programStructureWithExample"></a>
|
|
|
<h2 class="h3">Program Structure, with Simple Example</h2>
|
|
|
<div class="section">
|
|
|
<p>
|
|
@@ -1743,7 +1749,7 @@ int main(int argc, char argv) {
|
|
|
</div>
|
|
|
|
|
|
|
|
|
-<a name="N1062A"></a><a name="ch_gotchas"></a>
|
|
|
+<a name="N10634"></a><a name="ch_gotchas"></a>
|
|
|
<h2 class="h3">Gotchas: Common Problems and Troubleshooting</h2>
|
|
|
<div class="section">
|
|
|
<p>So now you know ZooKeeper. It's fast, simple, your application
|