Class BeamReaderCache.CachedReader<T>

java.lang.Object
org.apache.beam.runners.spark.structuredstreaming.io.streaming.BeamReaderCache.CachedReader<T>
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
BeamReaderCache

public static final class BeamReaderCache.CachedReader<T> extends Object implements Closeable
A live reader with the epoch it is positioned at and the coded mark taken there.
  • Method Details

    • reader

    • startOrAdvance

      public boolean startOrAdvance() throws IOException
      Throws:
      IOException
    • claimSentinel

      public boolean claimSentinel(boolean emitSentinel)
      Claims the one time end of stream sentinel for this reader once the driver has seen every split done.
    • started

      public boolean started()
      Whether startOrAdvance() was called at least once, only then may a mark be taken.
    • positionEpoch

      public long positionEpoch()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException