public class MapFlatBatchStreamReader extends Object implements BatchStreamReader
Values associated with different keys are stored in separate streams rather than having a single set of value streams for the map.
There is a ColumnEncoding associated with the value streams for a given key. All the ColumnEncodings for values have the same columnId, and use a sequenceId to distinguish them. The ColumnEncoding also contains the key it is associated with as metadata.
Note that the ColumnEncoding with sequenceId 0 for the values has no data associated with it, only statistics. Similarly there is a ColumnEncoding for the key stream which has no data associated with it, only statistics, so it is not used in this class.
Constructor and Description |
---|
MapFlatBatchStreamReader(Type type,
StreamDescriptor streamDescriptor,
org.joda.time.DateTimeZone hiveStorageTimeZone,
OrcRecordReaderOptions options,
OrcAggregatedMemoryContext systemMemoryContext) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getRetainedSizeInBytes() |
void |
prepareNextRead(int batchSize) |
Block |
readBlock() |
void |
startRowGroup(InputStreamSources dataStreamSources) |
void |
startStripe(Stripe stripe) |
String |
toString() |
public MapFlatBatchStreamReader(Type type, StreamDescriptor streamDescriptor, org.joda.time.DateTimeZone hiveStorageTimeZone, OrcRecordReaderOptions options, OrcAggregatedMemoryContext systemMemoryContext) throws OrcCorruptionException
OrcCorruptionException
public void prepareNextRead(int batchSize)
prepareNextRead
in interface BatchStreamReader
public Block readBlock() throws IOException
readBlock
in interface BatchStreamReader
IOException
public void startStripe(Stripe stripe) throws IOException
startStripe
in interface StreamReader
IOException
public void startRowGroup(InputStreamSources dataStreamSources) throws IOException
startRowGroup
in interface StreamReader
IOException
public void close()
close
in interface StreamReader
public long getRetainedSizeInBytes()
getRetainedSizeInBytes
in interface StreamReader
Copyright © 2012–2021. All rights reserved.