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.
  • Constructor Details

    • AbstractBinlogEventWriter

      public AbstractBinlogEventWriter()
  • Method Details

    • writeJson

      protected void writeJson(T event) throws IOException
      Throws:
      IOException
    • getCommonAttributes

      protected Map<String,String> getCommonAttributes(long sequenceId, BinlogEventInfo eventInfo)
    • writeEvent

      public long writeEvent(org.apache.nifi.processor.ProcessSession session, String transitUri, T eventInfo, long currentSequenceId, org.apache.nifi.processor.Relationship relationship, EventWriterConfiguration eventWriterConfiguration)
    • finishAndTransferFlowFile

      public void finishAndTransferFlowFile(org.apache.nifi.processor.ProcessSession session, EventWriterConfiguration eventWriterConfiguration, String transitUri, long seqId, BinlogEventInfo eventInfo, org.apache.nifi.processor.Relationship relationship)
    • configureEventWriter

      protected void configureEventWriter(EventWriterConfiguration eventWriterConfiguration, org.apache.nifi.processor.ProcessSession session, EventInfo eventInfo)
    • multipleEventsPerFlowFile

      private boolean multipleEventsPerFlowFile(EventWriterConfiguration eventWriterConfiguration)
    • writtenMultipleEvents

      private boolean writtenMultipleEvents(EventWriterConfiguration eventWriterConfiguration)
    • maxEventsPerFlowFile

      protected boolean maxEventsPerFlowFile(EventWriterConfiguration eventWriterConfiguration)
    • oneTransactionPerFlowFile

      protected boolean oneTransactionPerFlowFile(EventWriterConfiguration eventWriterConfiguration)