Class ProcessWindowFunction<IN,​OUT,​KEY,​W extends Window>

    • Constructor Detail

      • ProcessWindowFunction

        public ProcessWindowFunction()
    • Method Detail

      • process

        public abstract void process​(KEY key,
                                     ProcessWindowFunction.Context context,
                                     Iterable<IN> elements,
                                     Collector<OUT> out)
                              throws Exception
        Evaluates the window and outputs none or several elements.
        Parameters:
        key - The key for which this window is evaluated.
        context - The context in which the window is being evaluated.
        elements - The elements in the window being evaluated.
        out - A collector for emitting elements.
        Throws:
        Exception - The function may throw exceptions to fail the program and trigger recovery.
      • clear

        public void clear​(ProcessWindowFunction.Context context)
                   throws Exception
        Deletes any state in the Context when the Window expires (the watermark passes its maxTimestamp + allowedLateness).
        Parameters:
        context - The context to which the window is being evaluated
        Throws:
        Exception - The function may throw exceptions to fail the program and trigger recovery.