Class PredicateFirehose
- java.lang.Object
-
- org.apache.druid.segment.realtime.firehose.PredicateFirehose
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.druid.data.input.Firehose
public class PredicateFirehose extends Object implements org.apache.druid.data.input.Firehose
Provides a view on a firehose that only returns rows that match a certain predicate. Not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description PredicateFirehose(org.apache.druid.data.input.Firehose firehose, com.google.common.base.Predicate<org.apache.druid.data.input.InputRow> predicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasMore()org.apache.druid.data.input.InputRownextRow()
-
-
-
Method Detail
-
hasMore
public boolean hasMore() throws IOException- Specified by:
hasMorein interfaceorg.apache.druid.data.input.Firehose- Throws:
IOException
-
nextRow
@Nullable public org.apache.druid.data.input.InputRow nextRow()
- Specified by:
nextRowin interfaceorg.apache.druid.data.input.Firehose
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.druid.data.input.Firehose- Throws:
IOException
-
-