Package org.apache.druid.data.input
Class HandlingInputRowIterator
- java.lang.Object
-
- org.apache.druid.data.input.HandlingInputRowIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<InputRow>,CloseableIterator<InputRow>
public class HandlingInputRowIterator extends Object implements CloseableIterator<InputRow>
DecoratedCloseableIteratorthat can process rows withHandlingInputRowIterator.InputRowHandlers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHandlingInputRowIterator.InputRowHandler
-
Constructor Summary
Constructors Constructor Description HandlingInputRowIterator(CloseableIterator<InputRow> inputRowIterator, List<HandlingInputRowIterator.InputRowHandler> inputRowHandlers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()InputRownext()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.java.util.common.parsers.CloseableIterator
flatMap, map
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
HandlingInputRowIterator
public HandlingInputRowIterator(CloseableIterator<InputRow> inputRowIterator, List<HandlingInputRowIterator.InputRowHandler> inputRowHandlers)
- Parameters:
inputRowIterator- Source ofInputRowsinputRowHandlers- Before yielding the nextInputRow, eachHandlingInputRowIterator.InputRowHandleris sequentially applied to theInputRowuntil one of them returns true or all of the handlers are applied.
-
-
Method Detail
-
next
@Nullable public InputRow next()
- Specified by:
nextin interfaceIterator<InputRow>- Returns:
- Next
InputRowor null if row was successfully handled by anHandlingInputRowIterator.InputRowHandler.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-