mjsax commented on code in PR #18703:
URL: https://github.com/apache/kafka/pull/18703#discussion_r1929494128


##########
streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java:
##########
@@ -156,98 +123,30 @@ public interface KStream<K, V> {
      *     }
      * });
      * }</pre>
-     * Setting a new key might result in an internal data redistribution if a 
key based operator (like an aggregation or
-     * join) is applied to the result {@code KStream}.
+     * Setting a new key might result in an internal data redistribution if a 
key based operator (like an aggregation
+     * or join) is applied to the result {@code KStream}.
+     *
+     * @param mapper
+     *        a {@link KeyValueMapper} that computes a new key for each input 
record
+     *
+     * @param <KOut> the new key type of the result stream
+     *
+     * @return A {@code KStream} that contains records with new key (possibly 
of a different type) and unmodified value.
      *
-     * @param mapper a {@link KeyValueMapper} that computes a new key for each 
record
-     * @param named  a {@link Named} config used to name the processor in the 
topology
-     * @param <KR>   the new key type of the result stream
-     * @return a {@code KStream} that contains records with new key (possibly 
of different type) and unmodified value
      * @see #map(KeyValueMapper)
-     * @see #flatMap(KeyValueMapper)
      * @see #mapValues(ValueMapper)
-     * @see #mapValues(ValueMapperWithKey)
-     * @see #flatMapValues(ValueMapper)
-     * @see #flatMapValues(ValueMapperWithKey)
-     */
-    <KR> KStream<KR, V> selectKey(final KeyValueMapper<? super K, ? super V, ? 
extends KR> mapper,
-                                  final Named named);
-
-    /**
-     * Transform each record of the input stream into a new record in the 
output stream (both key and value type can be
-     * altered arbitrarily).
-     * The provided {@link KeyValueMapper} is applied to each input record and 
computes a new output record.
-     * Thus, an input record {@code <K,V>} can be transformed into an output 
record {@code <K':V'>}.
-     * This is a stateless record-by-record operation (cf. {@link 
#process(ProcessorSupplier, String...)} for
-     * stateful record processing).
-     * <p>
-     * The example below normalizes the String key to upper-case letters and 
counts the number of token of the value string.
-     * <pre>{@code
-     * KStream<String, String> inputStream = builder.stream("topic");
-     * KStream<String, Integer> outputStream = inputStream.map(new 
KeyValueMapper<String, String, KeyValue<String, Integer>> {
-     *     KeyValue<String, Integer> apply(String key, String value) {
-     *         return new KeyValue<>(key.toUpperCase(), value.split(" 
").length);
-     *     }
-     * });
-     * }</pre>
-     * The provided {@link KeyValueMapper} must return a {@link KeyValue} type 
and must not return {@code null}.
-     * <p>
-     * Mapping records might result in an internal data redistribution if a 
key based operator (like an aggregation or
-     * join) is applied to the result {@code KStream}. (cf. {@link 
#mapValues(ValueMapper)})
-     *
-     * @param mapper a {@link KeyValueMapper} that computes a new output record
-     * @param <KR>   the key type of the result stream
-     * @param <VR>   the value type of the result stream
-     * @return a {@code KStream} that contains records with new key and value 
(possibly both of different type)
-     * @see #selectKey(KeyValueMapper)
      * @see #flatMap(KeyValueMapper)
-     * @see #mapValues(ValueMapper)
-     * @see #mapValues(ValueMapperWithKey)
      * @see #flatMapValues(ValueMapper)
-     * @see #flatMapValues(ValueMapperWithKey)
-     * @see #process(ProcessorSupplier, String...)
-     * @see #processValues(FixedKeyProcessorSupplier, String...)
      */
-    <KR, VR> KStream<KR, VR> map(final KeyValueMapper<? super K, ? super V, ? 
extends KeyValue<? extends KR, ? extends VR>> mapper);

Review Comment:
   `map()` is not removed -- I just change the order of method, from 
`selectKey()`, `map()`, `mapValues()` to `selectKey()`, `mapValues()`, `map()` 
-- make the diff bad again...
   
   Cf `KStreamImpl` -- it's clear there w/o the JavaDoc diff.
   
   (The new order it IMHO more logical, and even if not strictly necessary, 
there is reason behind the madness... -- hope we can merge this)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to