Interface Processor

  • All Superinterfaces:
    Serializable

    public interface Processor
    extends Serializable
    The process function (engine low level operator)
    • Method Detail

      • processElement

        void processElement​(KastRow kRow,
                            KastProcessorContext context,
                            KastCollector collector,
                            KastRowBuilder kastRowBuilder)
                     throws Exception
        Parameters:
        kRow - in value
        context - the ProcessFunction.Context to eventually emit side-output streams
        collector - the out row collector
        Throws:
        Exception - in case of problem. This will stop your stream.
      • getProducedType

        org.apache.avro.Schema getProducedType​(org.apache.avro.Schema schema)
        Declare the data type information of the data produced by your function.
        Parameters:
        schema - the input row schema
        Returns:
        the output row type information
      • getSidesOutProducedType

        default Map<String,​org.apache.avro.Schema> getSidesOutProducedType​(org.apache.avro.Schema schema)
        Declare the data type information of the sides out data produced by your function.
        Returns:
        the sides output type information
      • open

        default void open​(Map<String,​String> configuration,
                          org.apache.avro.Schema schema,
                          KastRuntimeContext runtimeContext,
                          Map<String,​KastOutputTag> sidesOutputTag)
                   throws Exception
        Initialization method for the function.
        Parameters:
        configuration - The configuration containing the parameters attached to the contract
        schema - the input row schema
        runtimeContext - Context that contains information about the UDF's runtime
        sidesOutputTag - Side output typeinfo and tag dict if any
        Throws:
        Exception - The function may throw exceptions which cause the streaming program to fail and go into recovery.
      • open

        default void open​(Map<String,​String> configuration,
                          org.apache.avro.Schema schema,
                          KastRuntimeContext runtimeContext,
                          Map<String,​KastOutputTag> sidesOutputTag,
                          Map<String,​Object> meta)
                   throws Exception
        Initialization method for the function.
        Parameters:
        configuration - The configuration containing the parameters attached to the contract
        schema - the input row schema
        runtimeContext - Context that contains information about the UDF's runtime
        sidesOutputTag - Side output typeinfo and tag dict if any
        meta - function meta
        Throws:
        Exception - The function may throw exceptions which cause the streaming program to fail and go into recovery.
      • close

        default void close()
                    throws Exception
        Tear-down method for the user code. It is called after the last call to the main working methods. For functions that are part of an iteration, this method will be invoked after each iteration superstep.

        This method can be used for clean up work.

        Throws:
        Exception - The function may throw exceptions which cause the streaming program to fail and go into recovery.