kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mj...@apache.org
Subject [kafka] branch 0.10.0 updated: KAFKA-10222: Incorrect methods show up in 0.10 Kafka Streams docs (#8980)
Date Tue, 07 Jul 2020 17:46:44 GMT
This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch 0.10.0
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/0.10.0 by this push:
     new d8fe204  KAFKA-10222: Incorrect methods show up in 0.10 Kafka Streams docs (#8980)
d8fe204 is described below

commit d8fe204376e6911210525cd74a861e31b5f8617b
Author: huxi <huxi_2b@hotmail.com>
AuthorDate: Wed Jul 8 01:46:02 2020 +0800

    KAFKA-10222: Incorrect methods show up in 0.10 Kafka Streams docs (#8980)
    
    Non-existent methods show up in the doc:
    builder.from("my-input-topic").mapValue(value -> value.length().toString()).to("my-output-topic");
    
    There is no method named from or mapValues. They should be stream and mapValues respectively.
    
    Reviewers: Matthias J. Sax <matthias@confluent.io>
---
 streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
index 3a311a8..465517e 100644
--- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
+++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
@@ -71,7 +71,7 @@ import java.util.concurrent.atomic.AtomicInteger;
  *    StreamsConfig config = new StreamsConfig(props);
  *
  *    KStreamBuilder builder = new KStreamBuilder();
- *    builder.from("my-input-topic").mapValue(value -&gt; value.length().toString()).to("my-output-topic");
+ *    builder.stream("my-input-topic").mapValues(value -&gt; value.length().toString()).to("my-output-topic");
  *
  *    KafkaStreams streams = new KafkaStreams(builder, config);
  *    streams.start();


Mime
View raw message