public class HoodieAvroDataBlock extends HoodieDataBlock
HoodieLogBlock.FooterMetadataType, HoodieLogBlock.HeaderMetadataType, HoodieLogBlock.HoodieLogBlockContentLocation, HoodieLogBlock.HoodieLogBlockTypereaderSchema, shouldWriteRecordPositionsreadBlockLazily, version| Constructor and Description |
|---|
HoodieAvroDataBlock(List<HoodieRecord> records,
boolean shouldWriteRecordPositions,
Map<HoodieLogBlock.HeaderMetadataType,String> header,
String keyField) |
HoodieAvroDataBlock(List<HoodieRecord> records,
org.apache.avro.Schema schema)
Deprecated.
|
HoodieAvroDataBlock(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.
|
static HoodieAvroDataBlock |
getBlock(byte[] content,
org.apache.avro.Schema readerSchema) |
static HoodieAvroDataBlock |
getBlock(byte[] content,
org.apache.avro.Schema readerSchema,
InternalSchema internalSchema)
Deprecated.
|
HoodieLogBlock.HoodieLogBlockType |
getBlockType() |
byte[] |
getBytes(org.apache.avro.Schema schema)
Deprecated.
|
protected byte[] |
serializeRecords(List<HoodieRecord> records,
HoodieStorage storage) |
containsPartialUpdates, getContentBytes, getEngineRecordIterator, getEngineRecordIterator, getKeyField, getKeyFieldName, getRecordIterator, getRecordIterator, getRecordKey, getSchema, getSchemaFromHeader, getWriterSchema, lookupRecords, readRecordsFromBlockPayload, readRecordsFromBlockPayloadaddRecordPositionsToHeader, deflate, getBlockContentLocation, getContent, getLogBlockFooter, getLogBlockHeader, getLogBlockLength, getLogMetadata, getLogMetadataBytes, getMagic, getRecordPositions, inflate, isCompactedLogBlock, tryReadContentpublic HoodieAvroDataBlock(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 HoodieAvroDataBlock(@Nonnull List<HoodieRecord> records, boolean shouldWriteRecordPositions, @Nonnull Map<HoodieLogBlock.HeaderMetadataType,String> header, @Nonnull String keyField)
@Deprecated public HoodieAvroDataBlock(List<HoodieRecord> records, org.apache.avro.Schema schema)
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>> 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.public static HoodieAvroDataBlock getBlock(byte[] content, org.apache.avro.Schema readerSchema) throws IOException
IOException@Deprecated public static HoodieAvroDataBlock getBlock(byte[] content, org.apache.avro.Schema readerSchema, InternalSchema internalSchema) throws IOException
IOException@Deprecated public byte[] getBytes(org.apache.avro.Schema schema) throws IOException
IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.