Package 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
Description
`SequenceFileReader(File file)`
`SequenceFileReader(URI uri, Configuration c)`
`SequenceFileReader(SequenceFile.Reader reader, Configuration conf)`

## Method Summary

Modifier and Type
Method
Description
`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.lang.Iterable

`forEach, spliterator`

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

`forEachRemaining`

## Constructor Details

### 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 Details

### close

public void close() throws IOException

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

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<K>`

### iterator

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

Specified by:
  `iterator` in interface `Iterable<K>`

### getSchema

public org.apache.avro.Schema getSchema()

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

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<K>`

### next

public Pair<K,V> next()

Specified by:
  `next` in interface `Iterator<K>`

### next

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

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

### sync

public void sync(long position) throws IOException

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

### pastSync

public boolean pastSync(long position) throws IOException

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

### tell

public long tell() throws IOException

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