Functions#

RuntimeContext#

RuntimeContext.get_task_name()

Returns the name of the task in which the UDF runs, as assigned during plan construction.

RuntimeContext.get_number_of_parallel_subtasks()

Gets the parallelism with which the parallel task runs.

RuntimeContext.get_max_number_of_parallel_subtasks()

Gets the number of max-parallelism with which the parallel task runs.

RuntimeContext.get_index_of_this_subtask()

Gets the number of this parallel subtask.

RuntimeContext.get_attempt_number()

Gets the attempt number of this parallel subtask.

RuntimeContext.get_task_name_with_subtasks()

Returns the name of the task, appended with the subtask indicator, such as "MyTask (3/6)", where 3 would be (get_index_of_this_subtask() + 1), and 6 would be get_number_of_parallel_subtasks().

RuntimeContext.get_job_parameter(key, ...)

Gets the global job parameter value associated with the given key as a string.

RuntimeContext.get_metrics_group()

Gets the metric group.

RuntimeContext.get_state(state_descriptor)

Gets a handle to the system's key/value state.

RuntimeContext.get_list_state(state_descriptor)

Gets a handle to the system's key/value list state.

RuntimeContext.get_map_state(state_descriptor)

Gets a handle to the system's key/value map state.

RuntimeContext.get_reducing_state(...)

Gets a handle to the system's key/value reducing state.

RuntimeContext.get_aggregating_state(...)

Gets a handle to the system's key/value aggregating state.

Function#

All user-defined functions.

MapFunction()

Base class for Map functions.

CoMapFunction()

A CoMapFunction implements a map() transformation over two connected streams.

FlatMapFunction()

Base class for flatMap functions.

CoFlatMapFunction()

A CoFlatMapFunction implements a flat-map transformation over two connected streams.

ReduceFunction()

Base interface for Reduce functions.

AggregateFunction()

The AggregateFunction is a flexible aggregation function, characterized by the following features:

ProcessFunction()

A function that process elements of a stream.

KeyedProcessFunction()

A keyed function processes elements of a stream.

CoProcessFunction()

A function that processes elements of two streams and produces a single output one.

KeyedCoProcessFunction()

A function that processes elements of two keyed streams and produces a single output one.

WindowFunction(*args, **kwds)

Base interface for functions that are evaluated over keyed (grouped) windows.

AllWindowFunction(*args, **kwds)

Base interface for functions that are evaluated over non-keyed windows.

ProcessWindowFunction(*args, **kwds)

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

ProcessAllWindowFunction(*args, **kwds)

Base interface for functions that are evaluated over non-keyed windows using a context for retrieving extra information.

KeySelector()

The KeySelector allows to use deterministic objects for operations such as reduce, reduceGroup, join coGroup, etc.

NullByteKeySelector()

Used as a dummy KeySelector to allow using keyed operators for non-keyed use cases.

FilterFunction()

A filter function is a predicate applied individually to each record.

Partitioner()

Function to implement a custom partition assignment for keys.

BroadcastProcessFunction(*args, **kwds)

A function to be applied to a BroadcastConnectedStream that connects BroadcastStream, i.e. a stream with broadcast state, with a non-keyed DataStream.

KeyedBroadcastProcessFunction(*args, **kwds)

A function to be applied to a BroadcastConnectedStream that connects BroadcastStream, i.e. a stream with broadcast state, with a KeyedStream.