You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jg...@apache.org on 2018/01/25 17:25:32 UTC
[kafka] branch trunk updated: MINOR: Update consumer group command
documentation with additionally supported options (#4462)
This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 8202062 MINOR: Update consumer group command documentation with additionally supported options (#4462)
8202062 is described below
commit 82020629c54636fb9b0dded7f7262e45abea5e2e
Author: Vahid Hashemian <va...@us.ibm.com>
AuthorDate: Thu Jan 25 09:25:29 2018 -0800
MINOR: Update consumer group command documentation with additionally supported options (#4462)
With KIP-175 there are a number of consumer group command options that can be used to describe a consumer group.
This PR updates the documentation on consumer group command to mention those options.
---
docs/ops.html | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 46 insertions(+), 6 deletions(-)
diff --git a/docs/ops.html b/docs/ops.html
index 8624746..2c7d06c 100644
--- a/docs/ops.html
+++ b/docs/ops.html
@@ -15,7 +15,7 @@
limitations under the License.
-->
<script id="ops-template" type="text/x-handlebars-template">
-
+
Here is some information on actually running Kafka as a production system based on usage and experience at LinkedIn. Please send us any additional tips you know of.
<h3><a id="basic_ops" href="#basic_ops">6.1 Basic Kafka Operations</a></h3>
@@ -141,7 +141,7 @@
> bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers).
-
+
TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
my-topic 0 2 4 2 consumer-1-029af89c-873c-4751-a720-cefd41a669d6 /127.0.0.1 consumer-1
my-topic 1 2 3 1 consumer-1-029af89c-873c-4751-a720-cefd41a669d6 /127.0.0.1 consumer-1
@@ -177,12 +177,52 @@
To view offsets, as mentioned earlier, we "describe" the consumer group like this:
<pre class="brush: bash;">
- > bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-consumer-group
+ > bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group
- TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
- test-foo 0 1 3 2 consumer-1-a5d61779-4d04-4c50-a6d6-fb35d942642d /127.0.0.1 consumer-1
+ TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
+ topic3 0 241019 395308 154289 consumer2-e76ea8c3-5d30-4299-9005-47eb41f3d3c4 /127.0.0.1 consumer2
+ topic2 1 520678 803288 282610 consumer2-e76ea8c3-5d30-4299-9005-47eb41f3d3c4 /127.0.0.1 consumer2
+ topic3 1 241018 398817 157799 consumer2-e76ea8c3-5d30-4299-9005-47eb41f3d3c4 /127.0.0.1 consumer2
+ topic1 0 854144 855809 1665 consumer1-3fc8d6f1-581a-4472-bdf3-3515b4aee8c1 /127.0.0.1 consumer1
+ topic2 0 460537 803290 342753 consumer1-3fc8d6f1-581a-4472-bdf3-3515b4aee8c1 /127.0.0.1 consumer1
+ topic3 2 243655 398812 155157 consumer4-117fe4d3-c6c1-4178-8ee9-eb4a3954bee0 /127.0.0.1 consumer4
</pre>
+ There are a number of additional "describe" options that can be used to provide more detailed information about a consumer group that uses the new consumer API:
+ <ul>
+ <li>--members: This option provides the list of all active members in the consumer group.
+ <pre class="brush: bash;">
+ > bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group --members
+
+ CONSUMER-ID HOST CLIENT-ID #PARTITIONS
+ consumer1-3fc8d6f1-581a-4472-bdf3-3515b4aee8c1 /127.0.0.1 consumer1 2
+ consumer4-117fe4d3-c6c1-4178-8ee9-eb4a3954bee0 /127.0.0.1 consumer4 1
+ consumer2-e76ea8c3-5d30-4299-9005-47eb41f3d3c4 /127.0.0.1 consumer2 3
+ consumer3-ecea43e4-1f01-479f-8349-f9130b75d8ee /127.0.0.1 consumer3 0
+ </pre>
+ </li>
+ <li>--members --verbose: On top of the information reported by the "--members" options above, this option also provides the partitions assigned to each member.
+ <pre class="brush: bash;">
+ > bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group --members --verbose
+
+ CONSUMER-ID HOST CLIENT-ID #PARTITIONS ASSIGNMENT
+ consumer1-3fc8d6f1-581a-4472-bdf3-3515b4aee8c1 /127.0.0.1 consumer1 2 topic1(0), topic2(0)
+ consumer4-117fe4d3-c6c1-4178-8ee9-eb4a3954bee0 /127.0.0.1 consumer4 1 topic3(2)
+ consumer2-e76ea8c3-5d30-4299-9005-47eb41f3d3c4 /127.0.0.1 consumer2 3 topic2(1), topic3(0,1)
+ consumer3-ecea43e4-1f01-479f-8349-f9130b75d8ee /127.0.0.1 consumer3 0 -
+ </pre>
+ </li>
+ <li>--offsets: This is the default describe option and provides the same output as the "--describe" option.</li>
+ <li>--state: This option provides useful group-level information.
+ <pre class="brush: bash;">
+ > bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-group --state
+
+ COORDINATOR (ID) ASSIGNMENT-STRATEGY STATE #MEMBERS
+ localhost:9092 (0) range Stable 4
+ </pre>
+ </li>
+ </ul>
+
If you are using the old high-level consumer and storing the group metadata in ZooKeeper (i.e. <code>offsets.storage=zookeeper</code>), pass
<code>--zookeeper</code> instead of <code>bootstrap-server</code>:
@@ -1210,7 +1250,7 @@
own metrics. Each task has a number of processor nodes, with their own metrics. Each task also has a number of state stores
and record caches, all with their own metrics.
</p>
-
+
Use the following configuration option to specify which metrics
you want collected:
--
To stop receiving notification emails like this one, please contact
jgus@apache.org.