ProcessWindowFunction

@PublicEvolving
abstract class ProcessWindowFunction[IN, OUT, KEY, W <: Window] extends AbstractRichFunction

Base abstract class for functions that are evaluated over keyed (grouped) windows using a context for retrieving extra information.

Type parameters:
IN

The type of the input value.

KEY

The type of the key.

OUT

The type of the output value.

W

The type of the window.

class AbstractRichFunction
trait RichFunction
trait Function
trait Serializable
class Object
trait Matchable
class Any

Type members

Classlikes

abstract class Context

The context holding window metadata

The context holding window metadata

Value members

Abstract methods

@throws(scala.throws.$lessinit$greater$default$1[scala.Exception])
def process(key: KEY, context: Context, elements: Iterable[IN], out: Collector[OUT]): Unit

Evaluates the window and outputs none or several elements.

Evaluates the window and outputs none or several elements.

Value parameters:
context

The context in which the window is being evaluated.

elements

The elements in the window being evaluated.

key

The key for which this window is evaluated.

out

A collector for emitting elements.

Throws:
Exception

The function may throw exceptions to fail the program and trigger recovery.

Concrete methods

@throws(scala.throws.$lessinit$greater$default$1[scala.Exception])
def clear(context: Context): Unit

Deletes any state in the Context when the Window expires (the watermark passes its maxTimestamp + allowedLateness).

Deletes any state in the Context when the Window expires (the watermark passes its maxTimestamp + allowedLateness).

Value 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.

Inherited methods

@throws(java.lang.Exception)
def close(): Unit
Inherited from:
AbstractRichFunction
def getIterationRuntimeContext(): IterationRuntimeContext
Inherited from:
AbstractRichFunction
def getRuntimeContext(): RuntimeContext
Inherited from:
AbstractRichFunction
@throws(java.lang.Exception)
def open(x$0: Configuration): Unit
Inherited from:
AbstractRichFunction
def setRuntimeContext(x$0: RuntimeContext): Unit
Inherited from:
AbstractRichFunction