org.apache.avro.mapred
Class SequenceFileReader<K,V>
java.lang.Object
org.apache.avro.mapred.SequenceFileReader<K,V>
- All Implemented Interfaces:
- Closeable, Iterable<Pair<K,V>>, Iterator<Pair<K,V>>, FileReader<Pair<K,V>>
public class SequenceFileReader<K,V>
- extends Object
- implements FileReader<Pair<K,V>>
A FileReader
for sequence files.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- 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 Schema getSchema()
- Specified by:
getSchema
in interface 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 FileReader<Pair<K,V>>
- Throws:
IOException
sync
public void sync(long position)
throws IOException
- Specified by:
sync
in interface FileReader<Pair<K,V>>
- Throws:
IOException
pastSync
public boolean pastSync(long position)
throws IOException
- Specified by:
pastSync
in interface FileReader<Pair<K,V>>
- Throws:
IOException
tell
public long tell()
throws IOException
- Specified by:
tell
in interface FileReader<Pair<K,V>>
- Throws:
IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.