Interface Processor<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void execute​(T input, String streamId)
      Executes some operations on the input and possibly emits some results.
      void init​(ProcessorContext context)
      Initializes the processor.
      void punctuate​(String stream)
      Punctuation marks end of a batch which can be used to compute and pass the results of one stage in the pipeline to the next.
    • Method Detail

      • init

        void init​(ProcessorContext context)
        Initializes the processor. This is typically invoked from the underlying storm bolt's prepare method.
        Parameters:
        context - the processor context
      • execute

        void execute​(T input,
                     String streamId)
        Executes some operations on the input and possibly emits some results.
        Parameters:
        input - the input to be processed
        streamId - the source stream id from where the input is received
      • punctuate

        void punctuate​(String stream)
        Punctuation marks end of a batch which can be used to compute and pass the results of one stage in the pipeline to the next. For e.g. emit the results of an aggregation.
        Parameters:
        stream - the stream id on which the punctuation arrived