Repository: kafka
Updated Branches:
  refs/heads/trunk 394eda510 -> 395bf46dd


KAFKA-2881: Improve Consumer Configs and API Documentation

Author: Guozhang Wang <[email protected]>

Reviewers: Gwen Shapira

Closes #584 from guozhangwang/K2881


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/395bf46d
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/395bf46d
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/395bf46d

Branch: refs/heads/trunk
Commit: 395bf46ddac8c5fe1d6fd0d1636b94dcddadd678
Parents: 394eda5
Author: Guozhang Wang <[email protected]>
Authored: Tue Nov 24 16:39:01 2015 -0800
Committer: Gwen Shapira <[email protected]>
Committed: Tue Nov 24 16:39:01 2015 -0800

----------------------------------------------------------------------
 docs/api.html           | 17 +++++++++++++----
 docs/configuration.html | 13 +++++++++----
 docs/documentation.html | 16 +++++++++++-----
 3 files changed, 33 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/395bf46d/docs/api.html
----------------------------------------------------------------------
diff --git a/docs/api.html b/docs/api.html
index 8a266b7..87ba559 100644
--- a/docs/api.html
+++ b/docs/api.html
@@ -36,7 +36,16 @@ For those interested in the legacy Scala producer api, 
information can be found
 here</a>.
 </p>
 
-<h3><a id="highlevelconsumerapi" href="#highlevelconsumerapi">2.2 High Level 
Consumer API</a></h3>
+<h3><a id="consumerapi" href="#consumerapi">2.2 Consumer API</a></h3>
+
+As of the 0.9.0 release we have added a new Java consumer to replace our 
existing high-level ZooKeeper-based consumer
+and low-level consumer APIs. This client is considered beta quality. To ensure 
a smooth upgrade paths
+for users, we still maintain the old 0.8 consumer clients that continue to 
work on an 0.9 Kafka cluster.
+
+In the following sections we introduce both the old 0.8 consumer APIs (both 
high-level ConsumerConnector and low-level SimpleConsumer)
+and the new Java consumer API respectively.
+
+<h4><a id="highlevelconsumerapi" href="#highlevelconsumerapi">2.2.1 Old High 
Level Consumer API</a></h4>
 <pre>
 class Consumer {
   /**
@@ -108,7 +117,7 @@ public interface kafka.javaapi.consumer.ConsumerConnector {
 </pre>
 You can follow
 <a 
href="https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example"; 
title="Kafka 0.8 consumer example">this example</a> to learn how to use the 
high level consumer api.
-<h3><a id="simpleconsumerapi" href="#simpleconsumerapi">2.3 Simple Consumer 
API</a></h3>
+<h4><a id="simpleconsumerapi" href="#simpleconsumerapi">2.2.2 Old Simple 
Consumer API</a></h4>
 <pre>
 class kafka.javaapi.consumer.SimpleConsumer {
   /**
@@ -144,8 +153,8 @@ class kafka.javaapi.consumer.SimpleConsumer {
 For most applications, the high level consumer Api is good enough. Some 
applications want features not exposed to the high level consumer yet (e.g., 
set initial offset when restarting the consumer). They can instead use our low 
level SimpleConsumer Api. The logic will be a bit more complicated and you can 
follow the example in
 <a 
href="https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example";
 title="Kafka 0.8 SimpleConsumer example">here</a>.
 
-<h3><a id="newconsumerapi" href="#newconsumerapi">2.4 New Consumer API</a></h3>
-As of the 0.9.0 release we have added a replacement for our existing simple 
and high-level consumers. This client is considered beta quality. You can use 
this client by adding a dependency on the client jar using the following 
example maven co-ordinates (you can change the version numbers with new 
releases):
+<h4><a id="newconsumerapi" href="#newconsumerapi">2.2.3 New Consumer 
API</a></h4>
+This new unified consumer API removes the distinction between the 0.8 
high-level and low-level consumer APIs. You can use this client by adding a 
dependency on the client jar using the following example maven co-ordinates 
(you can change the version numbers with new releases):
 <pre>
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;

http://git-wip-us.apache.org/repos/asf/kafka/blob/395bf46d/docs/configuration.html
----------------------------------------------------------------------
diff --git a/docs/configuration.html b/docs/configuration.html
index 2dfc757..358431e 100644
--- a/docs/configuration.html
+++ b/docs/configuration.html
@@ -158,7 +158,12 @@ Below is the configuration of the Java producer:
 </p>
 
 <h3><a id="consumerconfigs" href="#consumerconfigs">3.3 Consumer 
Configs</a></h3>
-The essential consumer configurations are the following:
+
+We introduce both the old 0.8 consumer configs and the new consumer configs 
respectively below.
+
+<h4><a id="oldconsumerconfigs" href="#oldconsumerconfigs">3.3.1 Old Consumer 
Configs</a></h4>
+
+The essential old consumer configurations are the following:
 <ul>
         <li><code>group.id</code>
         <li><code>zookeeper.connect</code>
@@ -327,9 +332,9 @@ The essential consumer configurations are the following:
 
 <p>More details about consumer configuration can be found in the scala class 
<code>kafka.consumer.ConsumerConfig</code>.</p>
 
-<h3><a id="newconsumerconfigs" href="#newconsumerconfigs">3.4 New Consumer 
Configs</a></h3>
-Since 0.9.0.0 we have been working on a replacement for our existing simple 
and high-level consumers. The code can be considered beta quality. Below is the 
configuration for the new consumer:
+<h4><a id="newconsumerconfigs" href="#newconsumerconfigs">3.3.2 New Consumer 
Configs</a></h4>
+Since 0.9.0.0 we have been working on a replacement for our existing simple 
and high-level consumers. The code is considered beta quality. Below is the 
configuration for the new consumer:
 <!--#include virtual="consumer_config.html" -->
 
-<h3><a id="connectconfigs" href="#connectconfigs">3.5 Kafka Connect 
Configs</a></h3>
+<h3><a id="connectconfigs" href="#connectconfigs">3.4 Kafka Connect 
Configs</a></h3>
 <!--#include virtual="connect_config.html" -->

http://git-wip-us.apache.org/repos/asf/kafka/blob/395bf46d/docs/documentation.html
----------------------------------------------------------------------
diff --git a/docs/documentation.html b/docs/documentation.html
index d102cee..4ce7599 100644
--- a/docs/documentation.html
+++ b/docs/documentation.html
@@ -34,9 +34,12 @@ Prior releases: <a href="/07/documentation.html">0.7.x</a>, 
<a href="/08/documen
     <li><a href="#api">2. API</a>
           <ul>
               <li><a href="#producerapi">2.1 Producer API</a>
-              <li><a href="#highlevelconsumerapi">2.2 High Level Consumer 
API</a>
-              <li><a href="#simpleconsumerapi">2.3 Simple Consumer API</a>
-              <li><a href="#newconsumerapi">2.4 New Consumer API</a>
+              <li><a href="#consumerapi">2.2 Consumer API</a>
+                  <ul>
+                      <li><a href="#highlevelconsumerapi">2.2.1 Old High Level 
Consumer API</a>
+                      <li><a href="#simpleconsumerapi">2.2.2 Old Simple 
Consumer API</a>
+                      <li><a href="#newconsumerapi">2.2.3 New Consumer API</a>
+                  </ul>
           </ul>
     </li>
     <li><a href="#configuration">3. Configuration</a>
@@ -44,8 +47,11 @@ Prior releases: <a href="/07/documentation.html">0.7.x</a>, 
<a href="/08/documen
             <li><a href="#brokerconfigs">3.1 Broker Configs</a>
             <li><a href="#producerconfigs">3.2 Producer Configs</a>
             <li><a href="#consumerconfigs">3.3 Consumer Configs</a>
-            <li><a href="#newconsumerconfigs">3.4 New Consumer Configs</a>
-            <li><a href="#connectconfigs">3.5 Kafka Connect Configs</a>
+                <ul>
+                    <li><a href="#oldconsumerconfigs">3.3.1 Old Consumer 
Configs</a>
+                    <li><a href="#newconsumerconfigs">3.3.2 New Consumer 
Configs</a>
+                </ul>
+            <li><a href="#connectconfigs">3.4 Kafka Connect Configs</a>
         </ul>
     </li>
     <li><a href="#design">4. Design</a>

Reply via email to