Class AbstractBinlogEventWriter<T extends BinlogEventInfo>
java.lang.Object
org.apache.nifi.cdc.event.io.AbstractEventWriter<T>
org.apache.nifi.cdc.mysql.event.io.AbstractBinlogEventWriter<T>
- All Implemented Interfaces:
EventWriter<T>
- Direct Known Subclasses:
AbstractBinlogTableEventWriter,BeginTransactionEventWriter,CommitTransactionEventWriter
public abstract class AbstractBinlogEventWriter<T extends BinlogEventInfo>
extends AbstractEventWriter<T>
An abstract base class for writing MYSQL binlog events into flow file(s), e.g.
-
Field Summary
Fields inherited from class org.apache.nifi.cdc.event.io.AbstractEventWriter
jsonGeneratorFields inherited from interface org.apache.nifi.cdc.event.io.EventWriter
APPLICATION_JSON, CDC_EVENT_TYPE_ATTRIBUTE, SEQUENCE_ID_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureEventWriter(EventWriterConfiguration eventWriterConfiguration, ProcessSession session, EventInfo eventInfo) voidfinishAndTransferFlowFile(ProcessSession session, EventWriterConfiguration eventWriterConfiguration, String transitUri, long seqId, BinlogEventInfo eventInfo, Relationship relationship) getCommonAttributes(long sequenceId, BinlogEventInfo eventInfo) protected booleanmaxEventsPerFlowFile(EventWriterConfiguration eventWriterConfiguration) private booleanmultipleEventsPerFlowFile(EventWriterConfiguration eventWriterConfiguration) protected booleanoneTransactionPerFlowFile(EventWriterConfiguration eventWriterConfiguration) longwriteEvent(ProcessSession session, String transitUri, T eventInfo, long currentSequenceId, Relationship relationship, EventWriterConfiguration eventWriterConfiguration) protected voidprivate booleanwrittenMultipleEvents(EventWriterConfiguration eventWriterConfiguration) Methods inherited from class org.apache.nifi.cdc.event.io.AbstractEventWriter
createJsonGenerator, endFile, endJson, startJson
-
Constructor Details
-
AbstractBinlogEventWriter
public AbstractBinlogEventWriter()
-
-
Method Details
-
writeJson
- Throws:
IOException
-
getCommonAttributes
-
writeEvent
public long writeEvent(ProcessSession session, String transitUri, T eventInfo, long currentSequenceId, Relationship relationship, EventWriterConfiguration eventWriterConfiguration) -
finishAndTransferFlowFile
public void finishAndTransferFlowFile(ProcessSession session, EventWriterConfiguration eventWriterConfiguration, String transitUri, long seqId, BinlogEventInfo eventInfo, Relationship relationship) -
configureEventWriter
protected void configureEventWriter(EventWriterConfiguration eventWriterConfiguration, ProcessSession session, EventInfo eventInfo) -
multipleEventsPerFlowFile
-
writtenMultipleEvents
-
maxEventsPerFlowFile
-
oneTransactionPerFlowFile
-