Class SnapshotSegmentScanner

All Implemented Interfaces:
Closeable, AutoCloseable, KeyValueScanner, Shipper

A basic SegmentScanner used against an ImmutableScanner snapshot Used flushing where we do a single pass, no reverse scanning or inserts happening. Its a dumbed-down Scanner that can go fast. Like CollectionBackedScanner (but making it know about Segments was onerous).
  • Field Details

  • Constructor Details

  • Method Details

    • createIterator

      private static Iterator<ExtendedCell> createIterator(Segment segment)
    • peek

      public ExtendedCell peek()
      Description copied from interface: KeyValueScanner
      Look at the next Cell in this scanner, but do not iterate scanner. NOTICE: The returned cell has not been passed into ScanQueryMatcher. So it may not be what the user need.
      Returns:
      the next Cell
    • next

      public ExtendedCell next()
      Description copied from interface: KeyValueScanner
      Return the next Cell in this scanner, iterating the scanner
      Returns:
      the next Cell
    • seek

      public boolean seek(ExtendedCell seekCell)
      Description copied from interface: KeyValueScanner
      Seek the scanner at or after the specified KeyValue.
      Parameters:
      seekCell - seek value
      Returns:
      true if scanner has values left, false if end of scanner
    • reseek

      public boolean reseek(ExtendedCell seekCell)
      Description copied from interface: KeyValueScanner
      Reseek the scanner at or after the specified KeyValue. This method is guaranteed to seek at or after the required key only if the key comes after the current position of the scanner. Should not be used to seek to a key which may come before the current position.
      Parameters:
      seekCell - seek value (should be non-null)
      Returns:
      true if scanner has values left, false if end of scanner
    • getScannerOrder

      public long getScannerOrder()
      Description copied from interface: KeyValueScanner
      Get the order of this KeyValueScanner. This is only relevant for StoreFileScanners. This is required for comparing multiple files to find out which one has the latest data. StoreFileScanners are ordered from 0 (oldest) to newest in increasing order.
      See Also:
    • close

      public void close()
      Description copied from interface: KeyValueScanner
      Close the KeyValue scanner.