Class

org.apache.flink.streaming.api.scala

ConnectedStreams

Related Doc: package scala

Permalink

class ConnectedStreams[IN1, IN2] extends AnyRef

ConnectedStreams represents two connected streams of (possibly) different data types. Connected streams are useful for cases where operations on one stream directly affect the operations on the other stream, usually via shared state between the streams.

An example for the use of connected streams would be to apply rules that change over time onto another stream. One of the connected streams has the rules, the other stream the elements to apply the rules to. The operation on the connected stream maintains the current set of rules in the state. It may receive either a rule update and update the state or a data element and apply the rules in the state to the element.

The connected stream can be conceptually viewed as a union stream of an Either type, that holds either the first stream's type or the second stream's type.

Annotations
@Public()
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConnectedStreams
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConnectedStreams(javaStream: datastream.ConnectedStreams[IN1, IN2])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def flatMap[R](fun1: (IN1) ⇒ TraversableOnce[R], fun2: (IN2) ⇒ TraversableOnce[R])(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink

    Applies a CoFlatMap transformation on the connected streams.

    Applies a CoFlatMap transformation on the connected streams.

    The transformation consists of two separate functions, where the first one is called for each element of the first connected stream, and the second one is called for each element of the second connected stream.

    fun1

    Function called per element of the first input.

    fun2

    Function called per element of the second input.

    returns

    The resulting data stream.

  10. def flatMap[R](fun1: (IN1, Collector[R]) ⇒ Unit, fun2: (IN2, Collector[R]) ⇒ Unit)(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink

    Applies a CoFlatMap transformation on the connected streams.

    Applies a CoFlatMap transformation on the connected streams.

    The transformation consists of two separate functions, where the first one is called for each element of the first connected stream, and the second one is called for each element of the second connected stream.

    fun1

    Function called per element of the first input.

    fun2

    Function called per element of the second input.

    returns

    The resulting data stream.

  11. def flatMap[R](coFlatMapper: CoFlatMapFunction[IN1, IN2, R])(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink

    Applies a CoFlatMap transformation on these connected streams.

    Applies a CoFlatMap transformation on these connected streams.

    The transformation calls CoFlatMapFunction#flatMap1 for each element in the first stream and CoFlatMapFunction#flatMap2 for each element of the second stream.

    On can pass a subclass of org.apache.flink.streaming.api.functions.co.RichCoFlatMapFunction to gain access to the org.apache.flink.api.common.functions.RuntimeContext and to additional life cycle methods.

    coFlatMapper

    The CoFlatMapFunction used to transform the two connected streams

    returns

    The resulting data stream.

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def keyBy[K1, K2](fun1: (IN1) ⇒ K1, fun2: (IN2) ⇒ K2)(implicit arg0: TypeInformation[K1], arg1: TypeInformation[K2]): ConnectedStreams[IN1, IN2]

    Permalink

    Keys the two connected streams together.

    Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

    fun1

    The first stream's key function

    fun2

    The second stream's key function

    returns

    The key-grouped connected streams

  16. def keyBy(fields1: Array[String], fields2: Array[String]): ConnectedStreams[IN1, IN2]

    Permalink

    Keys the two connected streams together.

    Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

    fields1

    The first stream's key expressions

    fields2

    The second stream's key expressions

    returns

    The key-grouped connected streams

  17. def keyBy(field1: String, field2: String): ConnectedStreams[IN1, IN2]

    Permalink

    Keys the two connected streams together.

    Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

    field1

    The first stream's key expression

    field2

    The second stream's key expression

    returns

    The key-grouped connected streams

  18. def keyBy(keyPositions1: Array[Int], keyPositions2: Array[Int]): ConnectedStreams[IN1, IN2]

    Permalink

    Keys the two connected streams together.

    Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

    keyPositions1

    The first stream's key fields

    keyPositions2

    The second stream's key fields

    returns

    The key-grouped connected streams

  19. def keyBy(keyPosition1: Int, keyPosition2: Int): ConnectedStreams[IN1, IN2]

    Permalink

    Keys the two connected streams together.

    Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

    keyPosition1

    The first stream's key field

    keyPosition2

    The second stream's key field

    returns

    The key-grouped connected streams

  20. def map[R](coMapper: CoMapFunction[IN1, IN2, R])(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink

    Applies a CoMap transformation on these connected streams.

    Applies a CoMap transformation on these connected streams.

    The transformation calls CoMapFunction#map1 for each element in the first stream and CoMapFunction#map2 for each element of the second stream.

    On can pass a subclass of org.apache.flink.streaming.api.functions.co.RichCoMapFunction to gain access to the org.apache.flink.api.common.functions.RuntimeContext and to additional life cycle methods.

    coMapper

    The CoMapFunction used to transform the two connected streams

    returns

    The resulting data stream

  21. def map[R](fun1: (IN1) ⇒ R, fun2: (IN2) ⇒ R)(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink

    Applies a CoMap transformation on the connected streams.

    Applies a CoMap transformation on the connected streams.

    The transformation consists of two separate functions, where the first one is called for each element of the first connected stream, and the second one is called for each element of the second connected stream.

    fun1

    Function called per element of the first input.

    fun2

    Function called per element of the second input.

    returns

    The resulting data stream.

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def process[R](coProcessFunction: CoProcessFunction[IN1, IN2, R])(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink

    Applies the given CoProcessFunction on the connected input streams, thereby creating a transformed output stream.

    Applies the given CoProcessFunction on the connected input streams, thereby creating a transformed output stream.

    The function will be called for every element in the input streams and can produce zero or more output elements. Contrary to the flatMap(CoFlatMapFunction) function, this function can also query the time and set timers. When reacting to the firing of set timers the function can directly emit elements and/or register yet more timers.

    A RichCoProcessFunction can be used to gain access to features provided by the org.apache.flink.api.common.functions.RichFunction interface.

    coProcessFunction

    The CoProcessFunction that is called for each element in the stream.

    returns

    The transformed DataStream.

    Annotations
    @PublicEvolving()
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. def transform[R](functionName: String, operator: TwoInputStreamOperator[IN1, IN2, R])(implicit arg0: TypeInformation[R]): DataStream[R]

    Permalink
    Annotations
    @PublicEvolving()
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped