Interface CoMapFunction<IN1,IN2,OUT>

Type Parameters:
IN1 - Type of the first input.
IN2 - Type of the second input.
OUT - Output type.
All Superinterfaces:
org.apache.flink.api.common.functions.Function, Serializable

@Public public interface CoMapFunction<IN1,IN2,OUT> extends org.apache.flink.api.common.functions.Function, Serializable
A CoFlatMapFunction implements a map() transformation over two connected streams.

The same instance of the transformation function is used to transform both of the connected streams. That way, the stream transformations can share state.

  • Method Summary

    Modifier and Type
    Method
    Description
    map1(IN1 value)
    This method is called for each element in the first of the connected streams.
    map2(IN2 value)
    This method is called for each element in the second of the connected streams.
  • Method Details

    • map1

      OUT map1(IN1 value) throws Exception
      This method is called for each element in the first of the connected streams.
      Parameters:
      value - The stream element
      Returns:
      The resulting element
      Throws:
      Exception - The function may throw exceptions which cause the streaming program to fail and go into recovery.
    • map2

      OUT map2(IN2 value) throws Exception
      This method is called for each element in the second of the connected streams.
      Parameters:
      value - The stream element
      Returns:
      The resulting element
      Throws:
      Exception - The function may throw exceptions which cause the streaming program to fail and go into recovery.