T
- type of given values, if contains various types, use Object classpublic class DynamicPojoRecordReader<T> extends AbstractPojoRecordReader<List<T>>
Modifier and Type | Class and Description |
---|---|
static class |
DynamicPojoRecordReader.Converter
An utility class that converts from
JsonNode
to DynamicPojoRecordReader during physical plan fragment deserialization. |
DEFAULT_RECORDS_PER_BATCH, records, writers
DEFAULT_TEXT_COLS_TO_READ
ALLOCATOR_INITIAL_RESERVATION, ALLOCATOR_MAX_RESERVATION
Constructor and Description |
---|
DynamicPojoRecordReader(LinkedHashMap<String,Class<?>> schema,
List<List<T>> records) |
DynamicPojoRecordReader(LinkedHashMap<String,Class<?>> schema,
List<List<T>> records,
int maxRecordsToRead) |
Modifier and Type | Method and Description |
---|---|
protected Object |
getFieldValue(List<T> row,
int fieldPosition)
Retrieves field value to be written based for given row and field position.
|
protected List<PojoWriter> |
setupWriters(OutputMutator output)
Initiates writers based on given schema which contains field name and its type.
|
String |
toString() |
allocate, close, initWriter, iterator, next, setup
getColumns, getDefaultColumnsToRead, hasNext, isSkipQuery, isStarQuery, setColumns, transformColumns
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public DynamicPojoRecordReader(LinkedHashMap<String,Class<?>> schema, List<List<T>> records)
protected List<PojoWriter> setupWriters(OutputMutator output) throws ExecutionSetupException
setupWriters
in class AbstractPojoRecordReader<List<T>>
output
- output mutatorExecutionSetupException
protected Object getFieldValue(List<T> row, int fieldPosition)
AbstractPojoRecordReader
getFieldValue
in class AbstractPojoRecordReader<List<T>>
row
- current rowfieldPosition
- current field positionpublic String toString()
toString
in class AbstractRecordReader
Copyright © 1970 The Apache Software Foundation. All rights reserved.