- KeyedStream.partition_custom(partitioner: Union[Callable, pyflink.datastream.functions.Partitioner], key_selector: Union[Callable, pyflink.datastream.functions.KeySelector]) pyflink.datastream.data_stream.DataStream [source]#
Partitions a DataStream on the key returned by the selector, using a custom partitioner. This method takes the key selector to get the key to partition on, and a partitioner that accepts the key type.
Note that this method works only on single field keys, i.e. the selector cannot return tuples of fields.
partitioner – The partitioner to assign partitions to keys.
key_selector – The KeySelector with which the DataStream is partitioned.
The partitioned DataStream.