Class HiveTextRecordReader
java.lang.Object
org.apache.drill.exec.store.AbstractRecordReader
org.apache.drill.exec.store.hive.readers.HiveDefaultRecordReader
org.apache.drill.exec.store.hive.readers.HiveTextRecordReader
- All Implemented Interfaces:
- AutoCloseable,- RecordReader
Reading of Hive table stored in text format may require to skip few header/footer records.
 This class extends default reader to add the functionality.
- 
Field SummaryFields inherited from class org.apache.drill.exec.store.hive.readers.HiveDefaultRecordReaderempty, logger, mapredReader, outputWriter, partitionDeserializer, partitionToTableSchemaConverter, TARGET_RECORD_COUNT, valueHolderFields inherited from class org.apache.drill.exec.store.AbstractRecordReaderDEFAULT_TEXT_COLS_TO_READFields inherited from interface org.apache.drill.exec.store.RecordReaderALLOCATOR_INITIAL_RESERVATION, ALLOCATOR_MAX_RESERVATION
- 
Constructor SummaryConstructorsConstructorDescriptionHiveTextRecordReader(HiveTableWithColumnCache table, HivePartition partition, Collection<org.apache.hadoop.mapred.InputSplit> inputSplits, List<SchemaPath> projectedColumns, FragmentContext context, org.apache.hadoop.hive.conf.HiveConf hiveConf, org.apache.hadoop.security.UserGroupInformation proxyUgi) Constructor matching super.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidinternalInit(Properties hiveTableProperties) Default implementation does nothing, used to apply skip header/footer functionalityintnext()Reads batch of records skipping footer rows when necessary.Methods inherited from class org.apache.drill.exec.store.hive.readers.HiveDefaultRecordReaderclose, hasNextValue, readHiveRecordAndInsertIntoRecordBatch, setupMethods inherited from class org.apache.drill.exec.store.AbstractRecordReaderallocate, getColumns, getDefaultColumnsToRead, hasNext, isSkipQuery, isStarQuery, setColumns, toString, transformColumns
- 
Constructor Details- 
HiveTextRecordReaderpublic HiveTextRecordReader(HiveTableWithColumnCache table, HivePartition partition, Collection<org.apache.hadoop.mapred.InputSplit> inputSplits, List<SchemaPath> projectedColumns, FragmentContext context, org.apache.hadoop.hive.conf.HiveConf hiveConf, org.apache.hadoop.security.UserGroupInformation proxyUgi) Constructor matching super.- Parameters:
- table- metadata about Hive table being read
- partition- holder of metadata about table partitioning
- inputSplits- input splits for reading data from distributed storage
- projectedColumns- target columns for scan
- context- fragmentContext of fragment
- hiveConf- Hive configuration
- proxyUgi- user/group info to be used for initialization
 
 
- 
- 
Method Details- 
internalInitDescription copied from class:HiveDefaultRecordReaderDefault implementation does nothing, used to apply skip header/footer functionality- Overrides:
- internalInitin class- HiveDefaultRecordReader
- Parameters:
- hiveTableProperties- hive table properties
 
- 
nextpublic int next()Reads batch of records skipping footer rows when necessary.- Specified by:
- nextin interface- RecordReader
- Overrides:
- nextin class- HiveDefaultRecordReader
- Returns:
- count of read records
 
 
-