public class DictionaryFilter extends ExecutableOperator implements RecordPipelineOperator
Constructor and Description |
---|
DictionaryFilter()
Default constructor.
|
DictionaryFilter(String textField)
Constructor specifying the tokenized text field to filter.
|
DictionaryFilter(String textField,
String dictionaryField)
Constructor specifying the tokenized text field to filter and
the dictionary field in the dictionary input.
|
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 |
getDictionaryField()
Get the dictionary field in the dictionary input.
|
RecordPort |
getDictionaryInput()
Get the optional dictionary input port of this operator.
|
RecordPort |
getInput()
Get the input port of this operator.
|
String |
getInputField()
Get the tokenized text field to filter.
|
boolean |
getInverted()
Get whether the filter should be inverted
|
RecordPort |
getOutput()
Get the output port of this operator.
|
String |
getOutputField()
Get the name of the filtered output field.
|
void |
setDictionaryField(String dictionaryField)
Set the dictionary field in the dictionary input.
|
void |
setInputField(String textField)
Set the field to filter.
|
void |
setInverted(boolean inverted)
Set whether the filter should be inverted.
|
void |
setOutputField(String tokenField)
Set the name of the filtered output field.
|
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 DictionaryFilter()
setInputField(String)
and
setOutputField(String)
to set the name of the text
field to filter and its output field.public DictionaryFilter(String textField)
textField
- name of the field to filterpublic void setInputField(String textField)
If this field does not exist in the input, or is not of type TokenizedText, an exception will be thrown at composition time.
textField
- the name of the field to filterpublic String getInputField()
public void setOutputField(String tokenField)
tokenField
- name of the token output fieldpublic String getOutputField()
public void setDictionaryField(String dictionaryField)
dictionaryField
- name of the dictionary fieldpublic String getDictionaryField()
public void setInverted(boolean inverted)
inverted
- if true invert filterpublic boolean getInverted()
public RecordPort getInput()
getInput
in interface PipelineOperator<RecordPort>
public RecordPort getOutput()
getOutput
in interface PipelineOperator<RecordPort>
public RecordPort getDictionaryInput()
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 © 2021 Actian Corporation. All rights reserved.