Class PipelineBlock<I,​O>

  • Direct Known Subclasses:
    CharsetDecoderBlock, CsvLineProcessorBlock, LineSplitterBlock, StrListAppenderBlock

    public abstract class PipelineBlock<I,​O>
    extends Object
    A file parsing pipeline block. Accepts an portion of an input (isLastPortion flag is provided to signify the last block to process) and optionally calls the next block with transformed input or performs any other handling, such as storing input to internal structures.
    • Method Detail

      • append

        public <N> PipelineBlock<O,​N> append​(PipelineBlock<O,​N> next)
        Sets the next block in this block and returns the next block.

        Below is an example of using this method to set up a pipeline:
        block1.append(block2).append(block3); .

        Block2 here becomes the next for block1, and block3 is the next one for the block2.

        Parameters:
        next - The next block for the current block.
        Returns:
        The next block (next argument).
      • accept

        public abstract void accept​(I inputPortion,
                                    boolean isLastPortion)
                             throws IgniteCheckedException
        Accepts a portion of input. isLastPortion parameter should be set if this is a last portion of the input. The method must not be called after the end of input: the call with isLastPortion == true is the last one.
        Parameters:
        inputPortion - Portion of input.
        isLastPortion - Is this the last portion.
        Throws:
        IgniteCheckedException - On error.