Interface MetastoreCursor

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
InMemoryMetastoreCursor

public interface MetastoreCursor extends Closeable
A Metastore Cursor.
  • Field Details

  • Method Details

    • hasMoreEntries

      boolean hasMoreEntries()
      Is there any entries left in the cursor to read.
      Returns:
      true if there is entries left, false otherwise.
    • readEntries

      Iterator<MetastoreTableItem> readEntries(int numEntries) throws MSException
      Read entries from the cursor, up to the specified numEntries. The returned list can be smaller.
      Parameters:
      numEntries - maximum number of entries to read
      Returns:
      the iterator of returned entries.
      Throws:
      MSException - when failed to read entries from the cursor.
    • asyncReadEntries

      void asyncReadEntries(int numEntries, MetastoreCursor.ReadEntriesCallback callback, Object ctx)
      Asynchronously read entries from the cursor, up to the specified numEntries.
      Parameters:
      numEntries - maximum number of entries to read
      callback - callback object
      ctx - opaque context
      See Also: