Class TestingReaderOutput<E>

java.lang.Object
org.apache.flink.connector.testutils.source.reader.TestingReaderOutput<E>
All Implemented Interfaces:
org.apache.flink.api.common.eventtime.WatermarkOutput, org.apache.flink.api.connector.source.ReaderOutput<E>, org.apache.flink.api.connector.source.SourceOutput<E>

public class TestingReaderOutput<E> extends Object implements org.apache.flink.api.connector.source.ReaderOutput<E>
A ReaderOutput for testing that collects the emitted records.
  • Constructor Details

    • TestingReaderOutput

      public TestingReaderOutput()
  • Method Details

    • collect

      public void collect(E record)
      Specified by:
      collect in interface org.apache.flink.api.connector.source.ReaderOutput<E>
      Specified by:
      collect in interface org.apache.flink.api.connector.source.SourceOutput<E>
    • collect

      public void collect(E record, long timestamp)
      Specified by:
      collect in interface org.apache.flink.api.connector.source.ReaderOutput<E>
      Specified by:
      collect in interface org.apache.flink.api.connector.source.SourceOutput<E>
    • emitWatermark

      public void emitWatermark(org.apache.flink.api.common.eventtime.Watermark watermark)
      Specified by:
      emitWatermark in interface org.apache.flink.api.connector.source.ReaderOutput<E>
      Specified by:
      emitWatermark in interface org.apache.flink.api.common.eventtime.WatermarkOutput
    • markIdle

      public void markIdle()
      Specified by:
      markIdle in interface org.apache.flink.api.connector.source.ReaderOutput<E>
      Specified by:
      markIdle in interface org.apache.flink.api.common.eventtime.WatermarkOutput
    • markActive

      public void markActive()
      Specified by:
      markActive in interface org.apache.flink.api.common.eventtime.WatermarkOutput
    • createOutputForSplit

      public org.apache.flink.api.connector.source.SourceOutput<E> createOutputForSplit(String splitId)
      Specified by:
      createOutputForSplit in interface org.apache.flink.api.connector.source.ReaderOutput<E>
    • releaseOutputForSplit

      public void releaseOutputForSplit(String splitId)
      Specified by:
      releaseOutputForSplit in interface org.apache.flink.api.connector.source.ReaderOutput<E>
    • getEmittedRecords

      public ArrayList<E> getEmittedRecords()
    • clearEmittedRecords

      public void clearEmittedRecords()