Class EpochManager<OUT>


  • public class EpochManager<OUT>
    extends Object
    Epoch manager segments inputs into distinct epochs, marked by the arrival of non-records(e.g. watermark). Records are assigned to a unique epoch based on their arrival.
    • Constructor Detail

      • EpochManager

        public EpochManager()
    • Method Detail

      • onRecord

        public Epoch<OUT> onRecord()
        Add a record to the current epoch and return the current open epoch.
        Returns:
        the current open epoch.
      • getProperEpoch

        public Optional<Epoch<OUT>> getProperEpoch​(org.apache.flink.streaming.api.watermark.Watermark watermark)
      • onNonRecord

        public void onNonRecord​(org.apache.flink.streaming.api.watermark.Watermark watermark,
                                Runnable action)
        Add a non-record to the current epoch, close current epoch and open a new epoch.
        Parameters:
        watermark - the new watermark.
      • completeOneRecord

        public void completeOneRecord​(Epoch<OUT> epoch)
        Complete one record in the specific epoch. Must be invoked within task thread.
        Parameters:
        epoch - the specific epoch
      • close

        public void close()
      • getActiveEpoch

        @VisibleForTesting
        public Epoch<OUT> getActiveEpoch()