public class EventTimeAvroPayload extends DefaultHoodieRecordPayload
DefaultHoodieRecordPayload is that is does not
track the event time metadata for efficiency.DELETE_KEY, DELETE_MARKER, METADATA_EVENT_TIME_KEYisDeletedRecord, orderingVal, recordBytes| Constructor and Description |
|---|
EventTimeAvroPayload(org.apache.avro.generic.GenericRecord record,
Comparable orderingVal) |
EventTimeAvroPayload(Option<org.apache.avro.generic.GenericRecord> record) |
| Modifier and Type | Method and Description |
|---|---|
Option<org.apache.avro.generic.IndexedRecord> |
combineAndGetUpdateValue(org.apache.avro.generic.IndexedRecord currentValue,
org.apache.avro.Schema schema,
Properties properties)
This methods lets you write custom merging/combining logic to produce new values as a function of current value on storage and whats contained
in this object.
|
Option<org.apache.avro.generic.IndexedRecord> |
getInsertValue(org.apache.avro.Schema schema,
Properties properties)
Generates an avro record out of the given HoodieRecordPayload, to be written out to storage.
|
Option<Map<String,String>> |
getMetadata()
This method can be used to extract some metadata from HoodieRecordPayload.
|
isDeleted, isDeleteRecord, needUpdatingPersistedRecordcombineAndGetUpdateValue, getInsertValue, getOrderingValue, overwriteField, preCombinecanProduceSentinel, getOrderingVal, isDeleteRecordclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpreCombine, preCombinepublic EventTimeAvroPayload(org.apache.avro.generic.GenericRecord record,
Comparable orderingVal)
public EventTimeAvroPayload(Option<org.apache.avro.generic.GenericRecord> record)
public Option<org.apache.avro.generic.IndexedRecord> combineAndGetUpdateValue(org.apache.avro.generic.IndexedRecord currentValue, org.apache.avro.Schema schema, Properties properties) throws IOException
HoodieRecordPayloadeg: 1) You are updating counters, you may want to add counts to currentValue and write back updated counts 2) You may be reading DB redo logs, and merge them with current image for a database row on storage
combineAndGetUpdateValue in interface HoodieRecordPayload<OverwriteWithLatestAvroPayload>combineAndGetUpdateValue in class DefaultHoodieRecordPayloadcurrentValue - Current value in storage, to merge/combine this payload withschema - Schema used for recordproperties - Payload related properties. For example pass the ordering field(s) name to extract from value in storage.IOExceptionpublic Option<org.apache.avro.generic.IndexedRecord> getInsertValue(org.apache.avro.Schema schema, Properties properties) throws IOException
HoodieRecordPayloadgetInsertValue in interface HoodieRecordPayload<OverwriteWithLatestAvroPayload>getInsertValue in class DefaultHoodieRecordPayloadschema - Schema used for recordproperties - Payload related properties. For example pass the ordering field(s) name to extract from value in storage.IndexedRecord to be inserted.IOExceptionpublic Option<Map<String,String>> getMetadata()
HoodieRecordPayloadWriteStatus.markSuccess() and
WriteStatus.markFailure() in order to compute some aggregate metrics using the metadata in the context of a write success or failure.getMetadata in interface HoodieRecordPayload<OverwriteWithLatestAvroPayload>getMetadata in class DefaultHoodieRecordPayloadCopyright © 2024 The Apache Software Foundation. All rights reserved.