public class HoodieParquetDataBlock extends HoodieDataBlock
HoodieLogBlock.FooterMetadataType, HoodieLogBlock.HeaderMetadataType, HoodieLogBlock.HoodieLogBlockContentLocation, HoodieLogBlock.HoodieLogBlockTypereaderSchema, shouldWriteRecordPositionsreadBlockLazily, version| Constructor and Description |
|---|
HoodieParquetDataBlock(List<HoodieRecord> records,
boolean shouldWriteRecordPositions,
Map<HoodieLogBlock.HeaderMetadataType,String> header,
String keyField,
String compressionCodecName,
double expectedCompressionRatio,
boolean useDictionaryEncoding) |
HoodieParquetDataBlock(Supplier<SeekableDataInputStream> inputStreamSupplier,
Option<byte[]> content,
boolean readBlockLazily,
HoodieLogBlock.HoodieLogBlockContentLocation logBlockContentLocation,
Option<org.apache.avro.Schema> readerSchema,
Map<HoodieLogBlock.HeaderMetadataType,String> header,
Map<HoodieLogBlock.HeaderMetadataType,String> footer,
String keyField) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> ClosableIterator<HoodieRecord<T>> |
deserializeRecords(byte[] content,
HoodieRecord.HoodieRecordType type) |
protected <T> ClosableIterator<T> |
deserializeRecords(HoodieReaderContext<T> readerContext,
byte[] content)
Deserializes the content bytes of the data block to the records in engine-specific representation.
|
HoodieLogBlock.HoodieLogBlockType |
getBlockType() |
protected <T> ClosableIterator<T> |
readRecordsFromBlockPayload(HoodieReaderContext<T> readerContext) |
protected <T> ClosableIterator<HoodieRecord<T>> |
readRecordsFromBlockPayload(HoodieRecord.HoodieRecordType type)
NOTE: We're overriding the whole reading sequence to make sure we properly respect
the requested Reader's schema and only fetch the columns that have been explicitly
requested by the caller (providing projected Reader's schema)
|
protected byte[] |
serializeRecords(List<HoodieRecord> records,
HoodieStorage storage) |
containsPartialUpdates, getContentBytes, getEngineRecordIterator, getEngineRecordIterator, getKeyField, getKeyFieldName, getRecordIterator, getRecordIterator, getRecordKey, getSchema, getSchemaFromHeader, getWriterSchema, lookupRecordsaddRecordPositionsToHeader, deflate, getBlockContentLocation, getContent, getLogBlockFooter, getLogBlockHeader, getLogBlockLength, getLogMetadata, getLogMetadataBytes, getMagic, getRecordPositions, inflate, isCompactedLogBlock, tryReadContentpublic HoodieParquetDataBlock(Supplier<SeekableDataInputStream> inputStreamSupplier, Option<byte[]> content, boolean readBlockLazily, HoodieLogBlock.HoodieLogBlockContentLocation logBlockContentLocation, Option<org.apache.avro.Schema> readerSchema, Map<HoodieLogBlock.HeaderMetadataType,String> header, Map<HoodieLogBlock.HeaderMetadataType,String> footer, String keyField)
public HoodieParquetDataBlock(List<HoodieRecord> records, boolean shouldWriteRecordPositions, Map<HoodieLogBlock.HeaderMetadataType,String> header, String keyField, String compressionCodecName, double expectedCompressionRatio, boolean useDictionaryEncoding)
public HoodieLogBlock.HoodieLogBlockType getBlockType()
getBlockType in class HoodieDataBlockprotected byte[] serializeRecords(List<HoodieRecord> records, HoodieStorage storage) throws IOException
serializeRecords in class HoodieDataBlockIOExceptionprotected <T> ClosableIterator<HoodieRecord<T>> readRecordsFromBlockPayload(HoodieRecord.HoodieRecordType type) throws IOException
readRecordsFromBlockPayload in class HoodieDataBlockIOExceptionprotected <T> ClosableIterator<T> readRecordsFromBlockPayload(HoodieReaderContext<T> readerContext) throws IOException
readRecordsFromBlockPayload in class HoodieDataBlockIOExceptionprotected <T> ClosableIterator<HoodieRecord<T>> deserializeRecords(byte[] content, HoodieRecord.HoodieRecordType type) throws IOException
deserializeRecords in class HoodieDataBlockIOExceptionprotected <T> ClosableIterator<T> deserializeRecords(HoodieReaderContext<T> readerContext, byte[] content) throws IOException
HoodieDataBlockdeserializeRecords in class HoodieDataBlockT - Record type of engine-specific representation.readerContext - Hudi reader context with engine-specific implementation.content - Content in byte array.ClosableIterator of records in engine-specific representation.IOException - upon deserialization error.Copyright © 2024 The Apache Software Foundation. All rights reserved.