Class InMemoryMetastoreCursor

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, MetastoreCursor

    class InMemoryMetastoreCursor
    extends java.lang.Object
    implements MetastoreCursor
    • Constructor Detail

      • InMemoryMetastoreCursor

        public InMemoryMetastoreCursor​(java.util.SortedMap<java.lang.String,​Versioned<Value>> map,
                                       java.util.Set<java.lang.String> fields,
                                       java.util.concurrent.ScheduledExecutorService scheduler)
    • Method Detail

      • hasMoreEntries

        public boolean hasMoreEntries()
        Description copied from interface: MetastoreCursor
        Is there any entries left in the cursor to read.
        Specified by:
        hasMoreEntries in interface MetastoreCursor
        Returns:
        true if there is entries left, false otherwise.
      • readEntries

        public java.util.Iterator<MetastoreTableItem> readEntries​(int numEntries)
                                                           throws MSException
        Description copied from interface: MetastoreCursor
        Read entries from the cursor, up to the specified numEntries. The returned list can be smaller.
        Specified by:
        readEntries in interface MetastoreCursor
        Parameters:
        numEntries - maximum number of entries to read
        Returns:
        the iterator of returned entries.
        Throws:
        MSException - when failed to read entries from the cursor.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException