[ 
https://issues.apache.org/jira/browse/KAFKA-6993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503831#comment-16503831
 ] 

ASF GitHub Bot commented on KAFKA-6993:
---------------------------------------

guozhangwang closed pull request #5136: KAFKA-6993: Fix defective 
documentations for KStream/KTable methods
URL: https://github.com/apache/kafka/pull/5136
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java 
b/streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java
index da86a75b9e3..b6cc544cc4d 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java
@@ -417,8 +417,8 @@
     KStream<K, V> merge(final KStream<K, V> stream);
 
     /**
-     * Materialize this stream to a topic and creates a new {@code KStream} 
from the topic using default serializers and
-     * deserializers and producer's {@link DefaultPartitioner}.
+     * Materialize this stream to a topic and creates a new {@code KStream} 
from the topic using default serializers,
+     * deserializers, and producer's {@link DefaultPartitioner}.
      * The specified topic should be manually created before it is used (i.e., 
before the Kafka Streams application is
      * started).
      * <p>
@@ -947,8 +947,9 @@ void process(final ProcessorSupplier<? super K, ? super V> 
processorSupplier,
                                  final JoinWindows windows);
 
     /**
-     * Join records of this stream with another {@code KStream}'s records 
using windowed inner equi join with default
-     * serializers and deserializers.
+     * Join records of this stream with another {@code KStream}'s records 
using windowed inner equi join using the
+     * {@link Joined} instance for configuration of the {@link Serde key 
serde}, {@link Serde this stream's value serde},
+     * and {@link Serde the other stream's value serde}.
      * The join is computed on the records' key with join attribute {@code 
thisKStream.key == otherKStream.key}.
      * Furthermore, two records are only joined if their timestamps are close 
to each other as defined by the given
      * {@link JoinWindows}, i.e., the window defines an additional join 
predicate on the record timestamps.
@@ -1106,8 +1107,9 @@ void process(final ProcessorSupplier<? super K, ? super 
V> processorSupplier,
                                      final JoinWindows windows);
 
     /**
-     * Join records of this stream with another {@code KStream}'s records 
using windowed left equi join with default
-     * serializers and deserializers.
+     * Join records of this stream with another {@code KStream}'s records 
using windowed left equi join using the
+     * {@link Joined} instance for configuration of the {@link Serde key 
serde}, {@link Serde this stream's value serde},
+     * and {@link Serde the other stream's value serde}.
      * In contrast to {@link #join(KStream, ValueJoiner, JoinWindows) 
inner-join}, all records from this stream will
      * produce at least one output record (cf. below).
      * The join is computed on the records' key with join attribute {@code 
thisKStream.key == otherKStream.key}.
@@ -1270,8 +1272,9 @@ void process(final ProcessorSupplier<? super K, ? super 
V> processorSupplier,
                                       final JoinWindows windows);
 
     /**
-     * Join records of this stream with another {@code KStream}'s records 
using windowed outer equi join with default
-     * serializers and deserializers.
+     * Join records of this stream with another {@code KStream}'s records 
using windowed outer equi join using the
+     * {@link Joined} instance for configuration of the {@link Serde key 
serde}, {@link Serde this stream's value serde},
+     * and {@link Serde the other stream's value serde}.
      * In contrast to {@link #join(KStream, ValueJoiner, JoinWindows) 
inner-join} or
      * {@link #leftJoin(KStream, ValueJoiner, JoinWindows) left-join}, all 
records from both streams will produce at
      * least one output record (cf. below).
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java 
b/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
index da540ba627f..bdd6dc3b37a 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java
@@ -70,7 +70,7 @@
 
     /**
      * Create a new {@code KTable} that consists of all records of this {@code 
KTable} which satisfy the given
-     * predicate.
+     * predicate, with default serializers, deserializers, and state store.
      * All records that do not satisfy the predicate are dropped.
      * For each {@code KTable} update, the filter is evaluated based on the 
current update
      * record and then an update record is produced for the result {@code 
KTable}.
@@ -92,7 +92,8 @@
 
     /**
      * Create a new {@code KTable} that consists of all records of this {@code 
KTable} which satisfy the given
-     * predicate.
+     * predicate, with the {@link Serde key serde}, {@link Serde value serde}, 
and the underlying
+     * {@link KeyValueStore materialized state storage} configured in the 
{@link Materialized} instance.
      * All records that do not satisfy the predicate are dropped.
      * For each {@code KTable} update, the filter is evaluated based on the 
current update
      * record and then an update record is produced for the result {@code 
KTable}.
@@ -130,7 +131,7 @@
 
     /**
      * Create a new {@code KTable} that consists all records of this {@code 
KTable} which do <em>not</em> satisfy the
-     * given predicate.
+     * given predicate, with default serializers, deserializers, and state 
store.
      * All records that <em>do</em> satisfy the predicate are dropped.
      * For each {@code KTable} update, the filter is evaluated based on the 
current update
      * record and then an update record is produced for the result {@code 
KTable}.
@@ -152,7 +153,8 @@
 
     /**
      * Create a new {@code KTable} that consists all records of this {@code 
KTable} which do <em>not</em> satisfy the
-     * given predicate.
+     * given predicate, with the {@link Serde key serde}, {@link Serde value 
serde}, and the underlying
+     * {@link KeyValueStore materialized state storage} configured in the 
{@link Materialized} instance.
      * All records that <em>do</em> satisfy the predicate are dropped.
      * For each {@code KTable} update, the filter is evaluated based on the 
current update
      * record and then an update record is produced for the result {@code 
KTable}.
@@ -190,7 +192,7 @@
 
     /**
      * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value
-     * (with possible new type) in the new {@code KTable}.
+     * (with possibly a new type) in the new {@code KTable}, with default 
serializers, deserializers, and state store.
      * For each {@code KTable} update the provided {@link ValueMapper} is 
applied to the value of the updated record and
      * computes a new value for it, resulting in an updated record for the 
result {@code KTable}.
      * Thus, an input record {@code <K,V>} can be transformed into an output 
record {@code <K:V'>}.
@@ -224,7 +226,7 @@
 
     /**
      * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value
-     * (with possible new type) in the new {@code KTable}.
+     * (with possibly a new type) in the new {@code KTable}, with default 
serializers, deserializers, and state store.
      * For each {@code KTable} update the provided {@link ValueMapperWithKey} 
is applied to the value of the update
      * record and computes a new value for it, resulting in an updated record 
for the result {@code KTable}.
      * Thus, an input record {@code <K,V>} can be transformed into an output 
record {@code <K:V'>}.
@@ -259,7 +261,9 @@
 
     /**
      * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value
-     * (with possible new type) in the new {@code KTable}.
+     * (with possibly a new type) in the new {@code KTable}, with the {@link 
Serde key serde}, {@link Serde value serde},
+     * and the underlying {@link KeyValueStore materialized state storage} 
configured in the {@link Materialized}
+     * instance.
      * For each {@code KTable} update the provided {@link ValueMapper} is 
applied to the value of the updated record and
      * computes a new value for it, resulting in an updated record for the 
result {@code KTable}.
      * Thus, an input record {@code <K,V>} can be transformed into an output 
record {@code <K:V'>}.
@@ -303,7 +307,9 @@
 
     /**
      * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value
-     * (with possible new type) in the new {@code KTable}.
+     * (with possibly a new type) in the new {@code KTable}, with the {@link 
Serde key serde}, {@link Serde value serde},
+     * and the underlying {@link KeyValueStore materialized state storage} 
configured in the {@link Materialized}
+     * instance.
      * For each {@code KTable} update the provided {@link ValueMapperWithKey} 
is applied to the value of the update
      * record and computes a new value for it, resulting in an updated record 
for the result {@code KTable}.
      * Thus, an input record {@code <K,V>} can be transformed into an output 
record {@code <K:V'>}.
@@ -384,8 +390,8 @@
     <KR> KStream<KR, V> toStream(final KeyValueMapper<? super K, ? super V, ? 
extends KR> mapper);
 
     /**
-     * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value,
-     * (with possibly new type).
+     * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value
+     * (with possibly a new type), with default serializers, deserializers, 
and state store.
      * A {@link ValueTransformerWithKey} (provided by the given {@link 
ValueTransformerWithKeySupplier}) is applied to each input
      * record value and computes a new value for it.
      * Thus, an input record {@code <K,V>} can be transformed into an output 
record {@code <K:V'>}.
@@ -457,8 +463,9 @@
                                        final String... stateStoreNames);
 
     /**
-     * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value,
-     * (with possibly new type).
+     * Create a new {@code KTable} by transforming the value of each record in 
this {@code KTable} into a new value
+     * (with possibly a new type), with the {@link Serde key serde}, {@link 
Serde value serde}, and the underlying
+     * {@link KeyValueStore materialized state storage} configured in the 
{@link Materialized} instance.
      * A {@link ValueTransformerWithKey} (provided by the given {@link 
ValueTransformerWithKeySupplier}) is applied to each input
      * record value and computes a new value for it.
      * This is similar to {@link #mapValues(ValueMapperWithKey)}, but more 
flexible, allowing stateful, rather than stateless,
@@ -598,7 +605,8 @@
                                            final Serialized<KR, VR> 
serialized);
 
     /**
-     * Join records of this {@code KTable} with another {@code KTable}'s 
records using non-windowed inner equi join.
+     * Join records of this {@code KTable} with another {@code KTable}'s 
records using non-windowed inner equi join,
+     * with default serializers, deserializers, and state store.
      * The join is a primary key join with join attribute {@code 
thisKTable.key == otherKTable.key}.
      * The result is an ever updating {@code KTable} that represents the 
<em>current</em> (i.e., processing time) result
      * of the join.
@@ -672,7 +680,9 @@
                                 final ValueJoiner<? super V, ? super VO, ? 
extends VR> joiner);
 
     /**
-     * Join records of this {@code KTable} with another {@code KTable}'s 
records using non-windowed inner equi join.
+     * Join records of this {@code KTable} with another {@code KTable}'s 
records using non-windowed inner equi join,
+     * with the {@link Materialized} instance for configuration of the {@link 
Serde key serde},
+     * {@link Serde the result table's value serde}, and {@link KeyValueStore 
state store}.
      * The join is a primary key join with join attribute {@code 
thisKTable.key == otherKTable.key}.
      * The result is an ever updating {@code KTable} that represents the 
<em>current</em> (i.e., processing time) result
      * of the join.
@@ -751,7 +761,7 @@
 
     /**
      * Join records of this {@code KTable} (left input) with another {@code 
KTable}'s (right input) records using
-     * non-windowed left equi join.
+     * non-windowed left equi join, with default serializers, deserializers, 
and state store.
      * The join is a primary key join with join attribute {@code 
thisKTable.key == otherKTable.key}.
      * In contrast to {@link #join(KTable, ValueJoiner) inner-join}, all 
records from left {@code KTable} will produce
      * an output record (cf. below).
@@ -833,7 +843,8 @@
 
     /**
      * Join records of this {@code KTable} (left input) with another {@code 
KTable}'s (right input) records using
-     * non-windowed left equi join.
+     * non-windowed left equi join, with the {@link Materialized} instance for 
configuration of the {@link Serde key serde},
+     * {@link Serde the result table's value serde}, and {@link KeyValueStore 
state store}.
      * The join is a primary key join with join attribute {@code 
thisKTable.key == otherKTable.key}.
      * In contrast to {@link #join(KTable, ValueJoiner) inner-join}, all 
records from left {@code KTable} will produce
      * an output record (cf. below).
@@ -919,7 +930,7 @@
 
     /**
      * Join records of this {@code KTable} (left input) with another {@code 
KTable}'s (right input) records using
-     * non-windowed outer equi join.
+     * non-windowed outer equi join, with default serializers, deserializers, 
and state store.
      * The join is a primary key join with join attribute {@code 
thisKTable.key == otherKTable.key}.
      * In contrast to {@link #join(KTable, ValueJoiner) inner-join} or {@link 
#leftJoin(KTable, ValueJoiner) left-join},
      * all records from both input {@code KTable}s will produce an output 
record (cf. below).
@@ -1000,7 +1011,8 @@
 
     /**
      * Join records of this {@code KTable} (left input) with another {@code 
KTable}'s (right input) records using
-     * non-windowed outer equi join.
+     * non-windowed outer equi join, with the {@link Materialized} instance 
for configuration of the {@link Serde key serde},
+     * {@link Serde the result table's value serde}, and {@link KeyValueStore 
state store}.
      * The join is a primary key join with join attribute {@code 
thisKTable.key == otherKTable.key}.
      * In contrast to {@link #join(KTable, ValueJoiner) inner-join} or {@link 
#leftJoin(KTable, ValueJoiner) left-join},
      * all records from both input {@code KTable}s will produce an output 
record (cf. below).


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Fix defective documentations for KStream/KTable methods
> -------------------------------------------------------
>
>                 Key: KAFKA-6993
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6993
>             Project: Kafka
>          Issue Type: Bug
>          Components: documentation, streams
>            Reporter: Lee Dongjin
>            Assignee: Lee Dongjin
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> Some KStream/KTable methods, mainly join methods, are providing same 
> documentation for the default methods and overloaded methods:
>  * KStream#join
>  * KStream#leftJoin
>  * KStream#outerJoin
>  * KTable#filter
>  * KTable#filterNot
>  * KTable#mapValues
>  * KTable#transformValues
>  * KTable#join
>  * KTable#leftJoin
>  * KTable#outerJoin
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to