public class PostgresDebeziumAvroPayload extends AbstractDebeziumAvroPayload
Debezium change event types are determined for the op field in the payload
- For inserts, op=i - For deletes, op=d - For updates, op=u - For snapshot inserts, op=r
This payload implementation will issue matching insert, delete, updates against the hudi table
| Modifier and Type | Field and Description |
|---|---|
static String |
DEBEZIUM_TOASTED_VALUE |
isDeletedRecord, orderingVal, recordBytes| Constructor and Description |
|---|
PostgresDebeziumAvroPayload(org.apache.avro.generic.GenericRecord record,
Comparable orderingVal) |
PostgresDebeziumAvroPayload(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)
This methods is deprecated.
|
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.
|
protected boolean |
shouldPickCurrentRecord(org.apache.avro.generic.IndexedRecord currentRecord,
org.apache.avro.generic.IndexedRecord insertRecord,
org.apache.avro.Schema schema) |
getInsertValue, isDeleteRecordgetOrderingValue, overwriteField, preCombinecanProduceSentinel, getOrderingVal, isDeletedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInsertValue, getMetadata, preCombine, preCombinepublic static final String DEBEZIUM_TOASTED_VALUE
public PostgresDebeziumAvroPayload(org.apache.avro.generic.GenericRecord record,
Comparable orderingVal)
public PostgresDebeziumAvroPayload(Option<org.apache.avro.generic.GenericRecord> record)
protected boolean shouldPickCurrentRecord(org.apache.avro.generic.IndexedRecord currentRecord,
org.apache.avro.generic.IndexedRecord insertRecord,
org.apache.avro.Schema schema)
throws IOException
shouldPickCurrentRecord in class AbstractDebeziumAvroPayloadIOExceptionpublic 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
currentValue - 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> combineAndGetUpdateValue(org.apache.avro.generic.IndexedRecord currentValue, org.apache.avro.Schema schema) throws IOException
HoodieRecordPayloadHoodieRecordPayload.combineAndGetUpdateValue(IndexedRecord, Schema, Properties) for java docs.combineAndGetUpdateValue in interface HoodieRecordPayload<OverwriteWithLatestAvroPayload>combineAndGetUpdateValue in class AbstractDebeziumAvroPayloadIOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.