public class MaprDBJsonRecordReader extends AbstractRecordReader
Modifier and Type | Class and Description |
---|---|
protected static class |
MaprDBJsonRecordReader.SchemaState |
Modifier and Type | Field and Description |
---|---|
protected org.ojai.store.QueryCondition |
condition |
protected org.apache.drill.exec.store.mapr.db.json.DocumentReaderVectorWriter |
documentWriter |
protected MapRDBFormatPlugin |
formatPlugin |
protected static org.ojai.FieldPath[] |
ID_ONLY_PROJECTION |
protected org.ojai.Document |
lastDocument |
protected com.mapr.db.ojai.DBDocumentReaderBase |
lastDocumentReader |
protected int |
maxRecordsToRead |
protected MapRDBSubScanSpec |
subScanSpec |
protected com.mapr.db.Table |
table |
protected OjaiValueWriter |
valueWriter |
protected VectorContainerWriter |
vectorWriter |
protected OutputMutator |
vectorWriterMutator |
DEFAULT_TEXT_COLS_TO_READ
ALLOCATOR_INITIAL_RESERVATION, ALLOCATOR_MAX_RESERVATION
Modifier | Constructor and Description |
---|---|
|
MaprDBJsonRecordReader(MapRDBSubScanSpec subScanSpec,
MapRDBFormatPlugin formatPlugin,
List<SchemaPath> projectedColumns,
FragmentContext context,
int maxRecords,
TupleMetadata schema) |
protected |
MaprDBJsonRecordReader(MapRDBSubScanSpec subScanSpec,
MapRDBFormatPlugin formatPlugin,
List<SchemaPath> projectedColumns,
FragmentContext context,
TupleMetadata schema) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected boolean |
getIdOnly() |
protected boolean |
getIgnoreSchemaChange() |
protected org.ojai.FieldPath[] |
getScannedFields() |
protected com.mapr.db.Table |
getTable() |
static boolean |
includesIdField(Collection<org.ojai.FieldPath> projected) |
int |
next()
Increments this record reader forward, writing via the provided output
mutator into the output batch.
|
protected org.ojai.Document |
nextDocument() |
protected com.mapr.db.ojai.DBDocumentReaderBase |
nextDocumentReader() |
void |
setup(OperatorContext context,
OutputMutator output)
Configure the RecordReader with the provided schema and the record batch that should be written to.
|
String |
toString() |
protected Collection<SchemaPath> |
transformColumns(Collection<SchemaPath> columns) |
allocate, getColumns, getDefaultColumnsToRead, hasNext, isSkipQuery, isStarQuery, setColumns
protected static final org.ojai.FieldPath[] ID_ONLY_PROJECTION
protected com.mapr.db.Table table
protected org.ojai.store.QueryCondition condition
protected VectorContainerWriter vectorWriter
protected OutputMutator vectorWriterMutator
protected final MapRDBSubScanSpec subScanSpec
protected final MapRDBFormatPlugin formatPlugin
protected OjaiValueWriter valueWriter
protected org.apache.drill.exec.store.mapr.db.json.DocumentReaderVectorWriter documentWriter
protected int maxRecordsToRead
protected com.mapr.db.ojai.DBDocumentReaderBase lastDocumentReader
protected org.ojai.Document lastDocument
public MaprDBJsonRecordReader(MapRDBSubScanSpec subScanSpec, MapRDBFormatPlugin formatPlugin, List<SchemaPath> projectedColumns, FragmentContext context, int maxRecords, TupleMetadata schema)
protected MaprDBJsonRecordReader(MapRDBSubScanSpec subScanSpec, MapRDBFormatPlugin formatPlugin, List<SchemaPath> projectedColumns, FragmentContext context, TupleMetadata schema)
protected Collection<SchemaPath> transformColumns(Collection<SchemaPath> columns)
transformColumns
in class AbstractRecordReader
protected org.ojai.FieldPath[] getScannedFields()
protected boolean getIdOnly()
protected com.mapr.db.Table getTable()
protected boolean getIgnoreSchemaChange()
public void setup(OperatorContext context, OutputMutator output) throws ExecutionSetupException
RecordReader
context
- operator context for the readeroutput
- The place where output for a particular scan should be written. The record reader is responsible for
mutating the set of schema values for that particular record.ExecutionSetupException
public int next()
RecordReader
protected com.mapr.db.ojai.DBDocumentReaderBase nextDocumentReader()
protected org.ojai.Document nextDocument()
public static boolean includesIdField(Collection<org.ojai.FieldPath> projected)
public void close()
public String toString()
toString
in class AbstractRecordReader
Copyright © 1970 The Apache Software Foundation. All rights reserved.