Interface CoMapFunction<IN1,​IN2,​OUT>

  • Type Parameters:
    IN1 - Type of the first input.
    IN2 - Type of the second input.
    OUT - Output type.
    All Superinterfaces:
    Function, Serializable
    All Known Implementing Classes:
    RichCoMapFunction

    @Public
    public interface CoMapFunction<IN1,​IN2,​OUT>
    extends 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      OUT map1​(IN1 value)
      This method is called for each element in the first of the connected streams.
      OUT map2​(IN2 value)
      This method is called for each element in the second of the connected streams.
    • Method Detail

      • 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.