- java.lang.Object
-
- com.pervasive.datarush.operators.AbstractLogicalOperator
-
- com.pervasive.datarush.operators.CompositeOperator
-
- com.pervasive.datarush.matching.block.BlockCartesian
-
- All Implemented Interfaces:
LogicalOperator
public class BlockCartesian extends CompositeOperator
Block the input data by creating a cartesian product of the data.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BUFFER_ROWS
The default buffer size, in records, for blocking.
-
Constructor Summary
Constructors Constructor Description BlockCartesian()
Generates the Cartesian product of the inputs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compose(CompositionContext ctx)
Compose the body of this operator.int
getBufferRows()
Gets the size (in rows) of the memory buffer used to generate output pairs.String
getLeftFieldsPattern()
Gets the output naming pattern for fields from the left hand input.RecordPort
getLeftInput()
Gets the record port providing the left hand input to the pair generation.RecordPort
getOutput()
Gets the record port providing the results of the pair generation.String
getRightFieldsPattern()
Gets the output naming pattern for fields from the right hand input.RecordPort
getRightInput()
Gets the record port providing the right hand input to the pair generation.void
setBufferRows(int rows)
Sets the size (in rows) of the memory buffer used to generate output pairs.void
setLeftFieldsPattern(String pattern)
Sets the output naming pattern for fields from the left hand input.void
setRightFieldsPattern(String pattern)
Sets the output naming pattern for fields from the right hand input.-
Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
-
-
-
Field Detail
-
DEFAULT_BUFFER_ROWS
public static final int DEFAULT_BUFFER_ROWS
The default buffer size, in records, for blocking.- See Also:
setBufferRows(int)
, Constant Field Values
-
-
Method Detail
-
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:- Perform any validation of configuration, input types, etc
- Instantiate and configure sub-operators, adding them to the provided context via
the method
OperatorComposable.add(O)
- 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 classCompositeOperator
- Parameters:
ctx
- the context
-
-