Class UpdateRowsWriter
java.lang.Object
org.apache.nifi.cdc.event.io.AbstractEventWriter<UpdateRowsEventInfo>
org.apache.nifi.cdc.mysql.event.io.AbstractBinlogEventWriter<UpdateRowsEventInfo>
org.apache.nifi.cdc.mysql.event.io.AbstractBinlogTableEventWriter<UpdateRowsEventInfo>
org.apache.nifi.cdc.mysql.event.io.UpdateRowsWriter
- All Implemented Interfaces:
EventWriter<UpdateRowsEventInfo>
A writer class to output MySQL binlog "write rows" (aka INSERT) events to flow file(s).
-
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 TypeMethodDescriptionlongwriteEvent(ProcessSession session, String transitUri, UpdateRowsEventInfo eventInfo, long currentSequenceId, Relationship relationship, EventWriterConfiguration eventWriterConfiguration) Creates and transfers a new flow file whose contents are the JSON-serialized value of the specified event, and the sequence ID attribute setprotected voidwriteRow(UpdateRowsEventInfo event, Map.Entry<Serializable[], Serializable[]> row, BitSet includedColumns) Methods inherited from class org.apache.nifi.cdc.mysql.event.io.AbstractBinlogTableEventWriter
getWritableObject, writeJsonMethods inherited from class org.apache.nifi.cdc.mysql.event.io.AbstractBinlogEventWriter
configureEventWriter, finishAndTransferFlowFile, getCommonAttributes, maxEventsPerFlowFile, oneTransactionPerFlowFileMethods inherited from class org.apache.nifi.cdc.event.io.AbstractEventWriter
createJsonGenerator, endFile, endJson, startJson
-
Constructor Details
-
UpdateRowsWriter
public UpdateRowsWriter()
-
-
Method Details
-
writeEvent
public long writeEvent(ProcessSession session, String transitUri, UpdateRowsEventInfo eventInfo, long currentSequenceId, Relationship relationship, EventWriterConfiguration eventWriterConfiguration) Creates and transfers a new flow file whose contents are the JSON-serialized value of the specified event, and the sequence ID attribute set- Specified by:
writeEventin interfaceEventWriter<UpdateRowsEventInfo>- Overrides:
writeEventin classAbstractBinlogEventWriter<UpdateRowsEventInfo>- Parameters:
session- A reference to a ProcessSession from which the flow file(s) will be created and transferredeventInfo- An event whose value will become the contents of the flow file- Returns:
- The next available CDC sequence ID for use by the CDC processor
-
writeRow
protected void writeRow(UpdateRowsEventInfo event, Map.Entry<Serializable[], Serializable[]> row, BitSet includedColumns) throws IOException- Throws:
IOException
-