|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatchCtx
public class VectorizedRowBatchCtx
Context for Vectorized row batch. this calss does eager deserialization of row data using serde in the RecordReader layer. It has supports partitions in this layer so that the vectorized batch is populated correctly with the partition column.
Constructor Summary | |
---|---|
VectorizedRowBatchCtx()
Constructor for VectorizedRowBatchCtx |
|
VectorizedRowBatchCtx(StructObjectInspector rawRowOI,
StructObjectInspector rowOI,
Deserializer deserializer,
Map<String,Object> partitionValues,
Map<String,PrimitiveObjectInspector.PrimitiveCategory> partitionTypes)
Constructor for VectorizedRowBatchCtx |
Method Summary | |
---|---|
void |
addPartitionColsToBatch(VectorizedRowBatch batch)
Add the partition values to the batch |
void |
addRowToBatch(int rowIndex,
org.apache.hadoop.io.Writable rowBlob,
VectorizedRowBatch batch,
org.apache.hadoop.io.DataOutputBuffer buffer)
Adds the row to the batch after deserializing the row |
void |
convertRowBatchBlobToVectorizedBatch(Object rowBlob,
int rowsInBlob,
VectorizedRowBatch batch)
Deserialized set of rows and populates the batch |
VectorizedRowBatch |
createVectorizedRowBatch()
Creates a Vectorized row batch and the column vectors. |
void |
init(org.apache.hadoop.conf.Configuration hiveConf,
org.apache.hadoop.mapred.FileSplit split)
Initializes VectorizedRowBatch context based on the split and Hive configuration (Job conf with hive Plan). |
void |
init(org.apache.hadoop.conf.Configuration hiveConf,
String fileKey,
StructObjectInspector rowOI)
Initializes the VectorizedRowBatch context based on an arbitrary object inspector Used by non-tablescan operators when they change the vectorization context |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VectorizedRowBatchCtx(StructObjectInspector rawRowOI, StructObjectInspector rowOI, Deserializer deserializer, Map<String,Object> partitionValues, Map<String,PrimitiveObjectInspector.PrimitiveCategory> partitionTypes)
rawRowOI
- OI for raw row data (EG without partition cols)rowOI
- OI for the row (Raw row OI + partition OI)deserializer
- Deserializer for the row datapartitionValues
- Hash map of partition values. Key=TblColName value=PartitionValuepublic VectorizedRowBatchCtx()
Method Detail |
---|
public void init(org.apache.hadoop.conf.Configuration hiveConf, String fileKey, StructObjectInspector rowOI)
hiveConf
- fileKey
- The key on which to retrieve the extra column mapping from the map scratchrowOI
- Object inspector that shapes the column typespublic void init(org.apache.hadoop.conf.Configuration hiveConf, org.apache.hadoop.mapred.FileSplit split) throws ClassNotFoundException, IOException, SerDeException, InstantiationException, IllegalAccessException, HiveException
hiveConf
- Hive configuration using Hive plan is extractedsplit
- File split of the file being read
ClassNotFoundException
IOException
SerDeException
InstantiationException
IllegalAccessException
HiveException
public VectorizedRowBatch createVectorizedRowBatch() throws HiveException
HiveException
public void addRowToBatch(int rowIndex, org.apache.hadoop.io.Writable rowBlob, VectorizedRowBatch batch, org.apache.hadoop.io.DataOutputBuffer buffer) throws HiveException, SerDeException
rowIndex
- Row index in the batch to which the row is addedrowBlob
- Row blob (serialized version of row)batch
- Vectorized batch to which the row is addedbuffer
- a buffer to copy strings into
HiveException
SerDeException
public void convertRowBatchBlobToVectorizedBatch(Object rowBlob, int rowsInBlob, VectorizedRowBatch batch) throws SerDeException
rowBlob
- to deserializebatch
- Vectorized row batch which contains deserialized data
SerDeException
public void addPartitionColsToBatch(VectorizedRowBatch batch) throws HiveException
batch
-
HiveException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |