org.apache.avro.mapred

## Class SequenceFileReader<K,V>

- java.lang.Object
- - org.apache.avro.mapred.SequenceFileReader<K,V>

All Implemented Interfaces:
  Closeable, AutoCloseable, Iterable<Pair<K,V>>, Iterator<Pair<K,V>>, org.apache.avro.file.FileReader<Pair<K,V>>

    public class SequenceFileReader<K,V>
    extends Object
    implements org.apache.avro.file.FileReader<Pair<K,V>>

A `FileReader` for sequence files.

### Constructor Summary

Constructors
Constructor and Description
`SequenceFileReader(File file)`
`SequenceFileReader(SequenceFile.Reader reader, Configuration conf)`
`SequenceFileReader(URI uri, Configuration c)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`org.apache.avro.Schema` `getSchema()`
`boolean` `hasNext()`
`Iterator<Pair<K,V>>` `iterator()`
`Pair<K,V>` `next()`
`Pair<K,V>` `next(Pair<K,V> reuse)`
`boolean` `pastSync(long position)`
`void` `remove()`
`void` `sync(long position)`
`long` `tell()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### SequenceFileReader

    public SequenceFileReader(File file)
                       throws IOException

Throws:
  `IOException`

#### SequenceFileReader

    public SequenceFileReader(URI uri,
                              Configuration c)
                       throws IOException

Throws:
  `IOException`

#### SequenceFileReader

    public SequenceFileReader(SequenceFile.Reader reader,
                              Configuration conf)

### Method Detail

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `IOException`

#### remove

    public void remove()

Specified by:
  `remove` in interface `Iterator<Pair<K,V>>`

#### iterator

    public Iterator<Pair<K,V>> iterator()

Specified by:
  `iterator` in interface `Iterable<Pair<K,V>>`

#### getSchema

    public org.apache.avro.Schema getSchema()

Specified by:
  `getSchema` in interface `org.apache.avro.file.FileReader<Pair<K,V>>`

#### hasNext

    public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<Pair<K,V>>`

#### next

    public Pair<K,V> next()

Specified by:
  `next` in interface `Iterator<Pair<K,V>>`

#### next

    public Pair<K,V> next(Pair<K,V> reuse)
                   throws IOException

Specified by:
  `next` in interface `org.apache.avro.file.FileReader<Pair<K,V>>`
Throws:
  `IOException`

#### sync

    public void sync(long position)
              throws IOException

Specified by:
  `sync` in interface `org.apache.avro.file.FileReader<Pair<K,V>>`
Throws:
  `IOException`

#### pastSync

    public boolean pastSync(long position)
                     throws IOException

Specified by:
  `pastSync` in interface `org.apache.avro.file.FileReader<Pair<K,V>>`
Throws:
  `IOException`

#### tell

    public long tell()
              throws IOException

Specified by:
  `tell` in interface `org.apache.avro.file.FileReader<Pair<K,V>>`
Throws:
  `IOException`