Class FSOrderedMapFile.EntryIterator<IK extends org.apache.hadoop.io.Writable,​IV extends org.apache.hadoop.io.Writable>

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.util.Iterator<java.util.Map.Entry<IK,​IV>>, Skipable
    Enclosing class:
    FSOrderedMapFile<K extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable>

    public static class FSOrderedMapFile.EntryIterator<IK extends org.apache.hadoop.io.Writable,​IV extends org.apache.hadoop.io.Writable>
    extends java.lang.Object
    implements java.util.Iterator<java.util.Map.Entry<IK,​IV>>, java.io.Closeable, Skipable
    an iterator for entries.
    • Field Detail

      • di

        protected java.io.DataInput di
      • numEntries

        protected int numEntries
      • counter

        protected int counter
    • Constructor Detail

      • EntryIterator

        public EntryIterator​(java.lang.String filename,
                             FixedSizeWriteableFactory<IK> _keyFactory,
                             FixedSizeWriteableFactory<IV> _valueFactory)
                      throws java.io.IOException
        constructor
        Parameters:
        filename -
        _keyFactory -
        _valueFactory -
        Throws:
        java.io.IOException
    • Method Detail

      • 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
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<IK extends org.apache.hadoop.io.Writable>
      • next

        public java.util.Map.Entry<IK,​IV> next()
        Specified by:
        next in interface java.util.Iterator<IK extends org.apache.hadoop.io.Writable>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<IK extends org.apache.hadoop.io.Writable>
      • skip

        public void skip​(int _numEntries)
                  throws java.io.IOException
        Specified by:
        skip in interface Skipable
        Throws:
        java.io.IOException