Browse Source

KAFKA-5918: Fix minor typos and errors in the Kafka Streams turotial

I found several minor issues with the Kafka Streams tutorial:
* Some typos
  * "As shown above, it illustrate that the constructed ..." instead of "As shown above, it illustrate_s_ that the constructed ..."
  * "same as Pipe.java below" instead of "same as Pipe.java _above_"
  * Wrong class name in the `LineSplit` example
* Incorrect imports for the code examples
  * Missing `import org.apache.kafka.streams.kstream.KStream;` in `LineSplit` and `WordCount` example
* Unnecessary (and potentially confusing) split by whitespaces in the `WorkCount` class (the split into words happened already in `LineSplit`)

Author: Jakub Scholz <www@scholzj.com>

Reviewers: Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>

Closes #3883 from scholzj/stream-tutorial-typos
pull/3883/merge
Jakub Scholz 7 years ago committed by Guozhang Wang
parent
commit
a64fe2ed88
  1. 10
      docs/streams/tutorial.html

10
docs/streams/tutorial.html

@ -186,7 +186,7 @@ @@ -186,7 +186,7 @@
</pre>
<p>
As shown above, it illustrate that the constructed topology has two processor nodes, a source node <code>KSTREAM-SOURCE-0000000000</code> and a sink node <code>KSTREAM-SINK-0000000001</code>.
As shown above, it illustrates that the constructed topology has two processor nodes, a source node <code>KSTREAM-SOURCE-0000000000</code> and a sink node <code>KSTREAM-SINK-0000000001</code>.
<code>KSTREAM-SOURCE-0000000000</code> continuously read records from Kafka topic <code>streams-plaintext-input</code> and pipe them to its downstream node <code>KSTREAM-SINK-0000000001</code>;
<code>KSTREAM-SINK-0000000001</code> will write each of its received record in order to another Kafka topic <code>streams-pipe-output</code>
(the <code>--&gt;</code> and <code>&lt;--</code> arrows dictates the downstream and upstream processor nodes of this node, i.e. "children" and "parents" within the topology graph).
@ -320,7 +320,7 @@ @@ -320,7 +320,7 @@
</p>
<pre class="brush: java;">
public class Pipe {
public class LineSplit {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
@ -405,6 +405,7 @@ @@ -405,6 +405,7 @@
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.Topology;
import org.apache.kafka.streams.kstream.KStream;
import java.util.Arrays;
import java.util.Properties;
@ -429,7 +430,7 @@ @@ -429,7 +430,7 @@
final KafkaStreams streams = new KafkaStreams(topology, props);
final CountDownLatch latch = new CountDownLatch(1);
// ... same as Pipe.java below
// ... same as Pipe.java above
}
}
</pre>
@ -566,6 +567,7 @@ @@ -566,6 +567,7 @@
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.Topology;
import org.apache.kafka.streams.kstream.KStream;
import java.util.Arrays;
import java.util.Locale;
@ -593,7 +595,7 @@ @@ -593,7 +595,7 @@
final KafkaStreams streams = new KafkaStreams(topology, props);
final CountDownLatch latch = new CountDownLatch(1);
// ... same as Pipe.java below
// ... same as Pipe.java above
}
}
</pre>

Loading…
Cancel
Save