You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by mj...@apache.org on 2022/12/28 23:41:31 UTC
[kafka] branch 3.4 updated: MINOR: Update WordCountTransformerDemo comments (#12470)
This is an automated email from the ASF dual-hosted git repository.
mjsax pushed a commit to branch 3.4
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.4 by this push:
new 9e27c2e9308 MINOR: Update WordCountTransformerDemo comments (#12470)
9e27c2e9308 is described below
commit 9e27c2e9308283c635ffb24d0872ca58a927c6a7
Author: David Karlsson <27...@users.noreply.github.com>
AuthorDate: Thu Dec 29 00:39:19 2022 +0100
MINOR: Update WordCountTransformerDemo comments (#12470)
Reviewers: Matthias J. Sax <ma...@confluent.io>
---
.../streams/examples/wordcount/WordCountTransformerDemo.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/streams/examples/src/main/java/org/apache/kafka/streams/examples/wordcount/WordCountTransformerDemo.java b/streams/examples/src/main/java/org/apache/kafka/streams/examples/wordcount/WordCountTransformerDemo.java
index 90f4764be7f..acc8f5bc919 100644
--- a/streams/examples/src/main/java/org/apache/kafka/streams/examples/wordcount/WordCountTransformerDemo.java
+++ b/streams/examples/src/main/java/org/apache/kafka/streams/examples/wordcount/WordCountTransformerDemo.java
@@ -45,7 +45,7 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
/**
- * Demonstrates, using a {@link Transformer} which combines the low-level Processor APIs with the high-level Kafka Streams DSL,
+ * Demonstrates, using a {@link Processor} implementing the low-level Processor APIs (replaces Transformer),
* how to implement the WordCount program that computes a simple word occurrence histogram from an input text.
* <p>
* <strong>Note: This is simplified code that only works correctly for single partition input topics.
@@ -55,10 +55,9 @@ import java.util.concurrent.CountDownLatch;
* represent lines of text; and the histogram output is written to topic "streams-wordcount-processor-output" where each record
* is an updated count of a single word.
* <p>
- * This example differs from {@link WordCountProcessorDemo} in that it uses a {@link Transformer} to define the word
- * count logic, and the topology is wired up through a {@link StreamsBuilder}, which more closely resembles the high-level DSL.
- * Additionally, the {@link TransformerSupplier} specifies the {@link StoreBuilder} that the {@link Transformer} needs
- * by implementing {@link ConnectedStoreProvider#stores()}.
+ * This example differs from {@link WordCountProcessorDemo} in that it uses a {@link ProcessorSupplier} to attach the Processor with the
+ * count logic to the Stream, and the topology is wired up through a {@link StreamsBuilder},
+ * which more closely resembles the high-level DSL (compared to the Topology builder approach, with Source, Processor, Sink).
* <p>
* Before running this example you must create the input topic and the output topic (e.g. via
* {@code bin/kafka-topics.sh --create ...}), and write some data to the input topic (e.g. via
@@ -164,4 +163,4 @@ public final class WordCountTransformerDemo {
}
System.exit(0);
}
-}
\ No newline at end of file
+}