public final class LogRows extends ExecutableOperator implements RecordSinkOperator
Constructor and Description |
---|
LogRows()
Default constructor.
|
LogRows(int frequency)
Use the given log frequency and the default row format.
|
LogRows(int frequency,
String format)
Use the given log frequency and row format.
|
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.
|
String |
getFormat()
Get the configured row format.
|
RecordPort |
getInput()
Gets the record port providing the input data to the sink.
|
int |
getLogFrequency()
Get the configured log frequency.
|
void |
setFormat(String format)
Set the format to use when logging rows.
|
void |
setLogFrequency(int logFrequency)
Set the frequency of rows to log.
|
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 LogRows()
public LogRows(int frequency)
frequency
- log frequencypublic LogRows(int frequency, String format)
frequency
- log frequencyformat
- row formatpublic RecordPort getInput()
RecordSinkOperator
getInput
in interface RecordSinkOperator
getInput
in interface SinkOperator<RecordPort>
public void setLogFrequency(int logFrequency)
logFrequency
- log frequency (default 0)public int getLogFrequency()
public void setFormat(String format)
MessageFormat
for
more information on the syntax of formats. Two variables are passed to the format:
the row count and the row contents. The default format is "row {0} is {1}"
.format
- row formatpublic String getFormat()
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 © 2016 Actian Corporation. All rights reserved.