public final class GenerateArithmeticSequence extends ExecutableOperator implements RecordSourceOperator
NOTE: this operator is non-parallel
Constructor and Description |
---|
GenerateArithmeticSequence()
Default constructor.
|
GenerateArithmeticSequence(long rowCount)
Generate an arithmetic sequence of the given number of rows.
|
GenerateArithmeticSequence(long rowCount,
RecordTokenType outputType)
Generate an arithmetic sequence of the given number of rows and type.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeMetadata(StreamingMetadataContext ctx)
Implementations must adhere to the following contracts
|
protected void |
execute(ExecutionContext ctx)
Executes the operator.
|
RecordPort |
getOutput()
Returns the output port whose values are equal to the sequence of
values.
|
RecordTokenType |
getOutputType()
Returns the output type.
|
long |
getRowCount()
Gets the number of rows to output
|
BigDecimal |
getStartValue()
Gets the first value to generate.
|
BigDecimal |
getStepSize()
Gets the difference between consecutive generated values.
|
void |
setOutputType(RecordTokenType outputType)
Sets the output type.
|
void |
setRowCount(long rowCount)
Sets the number of rows to output.
|
void |
setStartValue(BigDecimal startValue)
Sets the value of the first token in the sequence.
|
void |
setStepSize(BigDecimal stepSize)
Sets the difference between consecutive tokens in the generated sequence.
|
cloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutput
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public GenerateArithmeticSequence()
public GenerateArithmeticSequence(long rowCount)
long
.rowCount
- the number of rowspublic GenerateArithmeticSequence(long rowCount, RecordTokenType outputType)
rowCount
- the number of rows.outputType
- the output type. Generally will be a record type of
size 1.public void setStartValue(BigDecimal startValue)
startValue
- Value of the first token to generatepublic BigDecimal getStartValue()
public void setStepSize(BigDecimal stepSize)
stepSize
- Difference between consecutive generated tokenspublic BigDecimal getStepSize()
public void setRowCount(long rowCount)
rowCount
- the number of rows to outputpublic long getRowCount()
public RecordTokenType getOutputType()
long
.public void setOutputType(RecordTokenType outputType)
long
.outputType
- the output typepublic RecordPort getOutput()
getOutput
in interface RecordSourceOperator
getOutput
in interface SourceOperator<RecordPort>
protected void computeMetadata(StreamingMetadataContext ctx)
StreamingOperator
StreamingMetadataContext.parallelize(ParallelismStrategy)
.
RecordPort#setRequiredDataOrdering
, otherwise data may arrive in any order.
RecordPort#setRequiredDataDistribution
, otherwise data will arrive in an unspecified partial distribution
.
RecordPort#getSourceDataDistribution
and RecordPort#getSourceDataOrdering
. These should be
viewed as a hints to help chose a more efficient algorithm. In such cases, though, operators must
still declare data ordering and data distribution requirements; otherwise there is no guarantee that
data will arrive sorted/distributed as required.
RecordPort#setType
.RecordPort#setOutputDataOrdering
RecordPort#setOutputDataDistribution
AbstractModelPort#setMergeHandler
.MergeModel
is a convenient, re-usable model reducer, parameterized with
a merge-handler.
SimpleModelPort
's have no associated metadata and therefore there is
never any output metadata to declare. PMMLPort
's, on the other hand,
do have associated metadata. For all PMMLPorts, implementations must declare
the following:
PMMLPort.setPMMLModelSpec
.
computeMetadata
in class StreamingOperator
ctx
- the contextprotected void execute(ExecutionContext ctx)
ExecutableOperator
execute
in class ExecutableOperator
ctx
- context in which to lookup physical ports bound to logical portsCopyright © 2020 Actian Corporation. All rights reserved.