R - druid Row type returned as resultprotected class DruidQueryRecordReader.JsonParserIterator<R extends Comparable<R>> extends Object implements Iterator<R>, Closeable
| Constructor and Description |
|---|
JsonParserIterator(com.fasterxml.jackson.databind.ObjectMapper mapper,
com.fasterxml.jackson.databind.JavaType typeRef,
Future<InputStream> future,
String url,
io.druid.query.Query query) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasNext() |
R |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic JsonParserIterator(com.fasterxml.jackson.databind.ObjectMapper mapper,
com.fasterxml.jackson.databind.JavaType typeRef,
Future<InputStream> future,
String url,
io.druid.query.Query query)
mapper - mapper used to deserialize the stream of data (we use smile factory)typeRef - Type definition of the results objectsfuture - Future holding the input stream (the input stream is not owned but it will be closed when org.apache.hadoop.hive.druid.serde.DruidQueryRecordReader.JsonParserIterator#close() is called or reach the end of the steam)url - URL used to fetch the data, used mostly as message with exception stack to identify the faulty stream, thus this can be empty string.query - Query used to fetch the data, used mostly as message with exception stack, thus can be empty string.public boolean hasNext()
hasNext in interface Iterator<R extends Comparable<R>>public void remove()
remove in interface Iterator<R extends Comparable<R>>public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.