public class AWSDmsAvroPayload extends OverwriteWithLatestAvroPayload
| Modifier and Type | Field and Description |
|---|---|
static String |
OP_FIELD |
isDeletedRecord, orderingVal, recordBytes| Constructor and Description |
|---|
AWSDmsAvroPayload(org.apache.avro.generic.GenericRecord record,
Comparable orderingVal) |
AWSDmsAvroPayload(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.
|
Option<org.apache.avro.generic.IndexedRecord> |
getInsertValue(org.apache.avro.Schema schema)
This method is deprecated.
|
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.
|
protected boolean |
isDeleteRecord(org.apache.avro.generic.GenericRecord record) |
getOrderingValue, overwriteField, preCombinecanProduceSentinel, getOrderingVal, isDeletedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetadata, preCombine, preCombinepublic static final String OP_FIELD
public AWSDmsAvroPayload(org.apache.avro.generic.GenericRecord record,
Comparable orderingVal)
public AWSDmsAvroPayload(Option<org.apache.avro.generic.GenericRecord> record)
public Option<org.apache.avro.generic.IndexedRecord> getInsertValue(org.apache.avro.Schema schema, Properties properties) throws IOException
HoodieRecordPayloadschema - 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<org.apache.avro.generic.IndexedRecord> getInsertValue(org.apache.avro.Schema schema) throws IOException
HoodieRecordPayloadHoodieRecordPayload.getInsertValue(Schema, Properties) for java docs.getInsertValue in interface HoodieRecordPayload<OverwriteWithLatestAvroPayload>getInsertValue in class OverwriteWithLatestAvroPayloadschema - Schema used for recordIndexedRecord to be inserted.IOExceptionpublic 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 OverwriteWithLatestAvroPayloadIOExceptionprotected boolean isDeleteRecord(org.apache.avro.generic.GenericRecord record)
isDeleteRecord in class BaseAvroPayloadrecord - instance of GenericRecord of interest.Copyright © 2024 The Apache Software Foundation. All rights reserved.