Class BlockCartesian

All Implemented Interfaces:
LogicalOperator

public class BlockCartesian extends CompositeOperator
Block the input data by creating a cartesian product of the data.
  • Field Details

  • Constructor Details

    • BlockCartesian

      public BlockCartesian()
      Generates the Cartesian product of the inputs.
  • Method Details

    • getLeftFieldsPattern

      public String getLeftFieldsPattern()
      Gets the output naming pattern for fields from the left hand input.
      Returns:
      the pattern for the left hand side field names in output.
    • setLeftFieldsPattern

      public void setLeftFieldsPattern(String pattern)
      Sets the output naming pattern for fields from the left hand input. This is used to ensure distinct names in the output pairs.
      Parameters:
      pattern - name pattern for the left hand side field names
    • getRightFieldsPattern

      public String getRightFieldsPattern()
      Gets the output naming pattern for fields from the right hand input.
      Returns:
      the pattern for the right hand side field names in output.
    • setRightFieldsPattern

      public void setRightFieldsPattern(String pattern)
      Sets the output naming pattern for fields from the right hand input. This is used to ensure distinct names in the output pairs.
      Parameters:
      pattern - name pattern for the right hand side field names
    • getBufferRows

      public int getBufferRows()
      Gets the size (in rows) of the memory buffer used to generate output pairs.
      Returns:
      the number of rows allowed in the memory buffer
    • setBufferRows

      public void setBufferRows(int rows)
      Sets the size (in rows) of the memory buffer used to generate output pairs. Larger values can increase performance due to decreased intermediate file buffering.
      Parameters:
      rows - number of rows to store in memory buffer
    • getLeftInput

      public RecordPort getLeftInput()
      Gets the record port providing the left hand input to the pair generation.
      Returns:
      the left input port for the operation
    • getRightInput

      public RecordPort getRightInput()
      Gets the record port providing the right hand input to the pair generation.
      Returns:
      the right input port for the operation
    • getOutput

      public RecordPort getOutput()
      Gets the record port providing the results of the pair generation.
      Returns:
      the output port for the operation
    • compose

      protected void compose(CompositionContext ctx)
      Description copied from class: CompositeOperator
      Compose the body of this operator. Implementations should do the following:
      1. Perform any validation of configuration, input types, etc
      2. Instantiate and configure sub-operators, adding them to the provided context via the method OperatorComposable.add(O)
      3. Create necessary connections via the method OperatorComposable.connect(P, P). This includes connections from the composite's input ports to sub-operators, connections between sub-operators, and connections from sub-operators output ports to the composite's output ports
      Specified by:
      compose in class CompositeOperator
      Parameters:
      ctx - the context