public interface Filter extends EachOperation
Filters take in a tuple as input and decide whether or not to keep that tuple or not.
If the isKeep()
method of a Filter returns false
for a tuple, that tuple will be filtered out of the Stream
If your Filter
implementation has configuration requirements, you will typically want to extend BaseFilter
and override the Operation.prepare(Map, TridentOperationContext)
method to perform your custom initialization.
Stream
Modifier and Type | Method and Description |
---|---|
boolean |
isKeep(TridentTuple tuple)
Determines if a tuple should be filtered out of a stream
|
boolean isKeep(TridentTuple tuple)
Determines if a tuple should be filtered out of a stream
tuple
- the tuple being evaluatedfalse
to drop the tuple, true
to keep the tupleCopyright © 2019 The Apache Software Foundation. All Rights Reserved.