Package org.apache.druid.client
Class JsonParserIterator<T>
java.lang.Object
org.apache.druid.client.JsonParserIterator<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<T>,CloseableIterator<T>
-
Constructor Summary
ConstructorsConstructorDescriptionJsonParserIterator(com.fasterxml.jackson.databind.JavaType typeRef, Future<InputStream> future, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Bypasses Jackson serialization to prevent materialization of results from thefuturein memory at once.JsonParserIterator(com.fasterxml.jackson.databind.JavaType typeRef, Future<InputStream> future, String url, Query<T> query, String host, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.java.util.common.parsers.CloseableIterator
flatMap, mapMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
JsonParserIterator
-
JsonParserIterator
public JsonParserIterator(com.fasterxml.jackson.databind.JavaType typeRef, Future<InputStream> future, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Bypasses Jackson serialization to prevent materialization of results from thefuturein memory at once. A shortened version ofJsonParserIterator(JavaType, Future, String, Query, String, ObjectMapper)where the URL and host parameters, used solely for logging/errors, are not known.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-