DataStreamUtils

@Experimental
class DataStreamUtils[T](val self: DataStream[T])(implicit evidence$1: TypeInformation[T], evidence$2: ClassTag[T])

This class provides simple utility methods for collecting a DataStream, effectively enriching it with the functionality encapsulated by DataStreamUtils.

This experimental class is relocated from flink-streaming-contrib.

Value parameters:
self

DataStream

class Object
trait Matchable
class Any

Value members

Concrete methods

def collect(): Iterator[T]

Returns a scala iterator to iterate over the elements of the DataStream.

Returns a scala iterator to iterate over the elements of the DataStream.

Returns:

The iterator

def reinterpretAsKeyedStream[K : TypeInformation](keySelector: T => K): KeyedStream[T, K]

Reinterprets the given DataStream as a KeyedStream, which extracts keys with the given KeySelector.

Reinterprets the given DataStream as a KeyedStream, which extracts keys with the given KeySelector.

IMPORTANT: For every partition of the base stream, the keys of events in the base stream must be partitioned exactly in the same way as if it was created through a DataStream#keyBy.

Value parameters:
keySelector

Function that defines how keys are extracted from the data stream.

Returns:

The reinterpretation of the DataStream as a KeyedStream.

Concrete fields