Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2788#discussion_r89759912
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
 ---
    @@ -173,67 +174,67 @@ public KeyedStream(DataStream<T> dataStream, 
KeySelector<T, KEY> keySelector, Ty
        }
     
        /**
    -    * Applies the given {@link TimelyFlatMapFunction} on the input stream, 
thereby
    +    * Applies the given {@link ProcessFunction} on the input stream, 
thereby
         * creating a transformed output stream.
         *
         * <p>The function will be called for every element in the stream and 
can produce
         * zero or more output. The function can also query the time and set 
timers. When
         * reacting to the firing of set timers the function can emit yet more 
elements.
         *
    -    * <p>A {@link 
org.apache.flink.streaming.api.functions.RichTimelyFlatMapFunction}
    +    * <p>A {@link RichProcessFunction}
         * can be used to gain access to features provided by the
         * {@link org.apache.flink.api.common.functions.RichFunction} interface.
         *
    -    * @param flatMapper The {@link TimelyFlatMapFunction} that is called 
for each element
    +    * @param processFunction The {@link ProcessFunction} that is called 
for each element
         *                      in the stream.
         *
    -    * @param <R> The of elements emitted by the {@code 
TimelyFlatMapFunction}.
    +    * @param <R> The of elements emitted by the {@code ProcessFunction}.
         *
         * @return The transformed {@link DataStream}.
         */
    -   public <R> SingleOutputStreamOperator<R> 
flatMap(TimelyFlatMapFunction<T, R> flatMapper) {
    +   public <R> SingleOutputStreamOperator<R> process(ProcessFunction<T, R> 
processFunction) {
     
                TypeInformation<R> outType = 
TypeExtractor.getUnaryOperatorReturnType(
    -                           flatMapper,
    -                           TimelyFlatMapFunction.class,
    +                           processFunction,
    +                           ProcessFunction.class,
                                false,
                                true,
                                getType(),
                                Utils.getCallLocationName(),
                                true);
     
    -           return flatMap(flatMapper, outType);
    +           return process(processFunction, outType);
        }
     
        /**
    -    * Applies the given {@link TimelyFlatMapFunction} on the input stream, 
thereby
    +    * Applies the given {@link ProcessFunction} on the input stream, 
thereby
         * creating a transformed output stream.
         *
         * <p>The function will be called for every element in the stream and 
can produce
         * zero or more output. The function can also query the time and set 
timers. When
         * reacting to the firing of set timers the function can emit yet more 
elements.
         *
    --- End diff --
    
    <p>The function will be called for every element in the input streams and 
can produce zero or more
         * output elements. Contrary to the {@link #flatMap(FlatMapFunction)} 
function, this function can also
         * query the time and set timers. When reacting to the firing of set 
timers the function can directly
         * emit elements and/or register yet more timers.
         *


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to