Class ParquetBackedPBEventIterator

java.lang.Object
edu.stanford.slac.archiverappliance.plain.parquet.ParquetBackedPBEventIterator
All Implemented Interfaces:
EventStreamIterator, Closeable, AutoCloseable, Iterator<Event>

public class ParquetBackedPBEventIterator extends Object implements EventStreamIterator
An implementation of EventStreamIterator that reads from a Parquet reader.
  • Method Details

    • hasNext

      public boolean hasNext()
      Caches the next event, and returns if it exists.
      Specified by:
      hasNext in interface Iterator<Event>
      Returns:
      true if there is a next event, false otherwise.
    • close

      public void close()
      Closes the underlying Reader quietly. This method is useful if you only want to process the first few lines of a larger file. If you do not close the iterator then the Reader remains open. This method can safely be called multiple times.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • next

      public Event next()
      Returns the next event in the wrapped Reader.
      Specified by:
      next in interface Iterator<Event>
      Returns:
      the next event.
    • nextEvent

      public Event nextEvent()
      Returns the next line in the wrapped Reader.
      Returns:
      the next line from the input
      Throws:
      NoSuchElementException - if there is no line to return