|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.mapred.SequenceFileReader<K,V>
public class SequenceFileReader<K,V>
A FileReader
for sequence files.
Constructor Summary | |
---|---|
SequenceFileReader(File file)
|
|
SequenceFileReader(SequenceFile.Reader reader,
Configuration conf)
|
|
SequenceFileReader(URI uri,
Configuration c)
|
Method Summary | |
---|---|
void |
close()
|
Schema |
getSchema()
Return the schema for data in this file. |
boolean |
hasNext()
|
Iterator<Pair<K,V>> |
iterator()
|
Pair<K,V> |
next()
|
Pair<K,V> |
next(Pair<K,V> reuse)
Read the next datum from the file. |
boolean |
pastSync(long position)
Return true if past the next synchronization point after a position. |
void |
remove()
|
void |
sync(long position)
Move to the next synchronization point after a position. |
long |
tell()
Return the current position in the input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequenceFileReader(File file) throws IOException
IOException
public SequenceFileReader(URI uri, Configuration c) throws IOException
IOException
public SequenceFileReader(SequenceFile.Reader reader, Configuration conf)
Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
IOException
public void remove()
remove
in interface Iterator<Pair<K,V>>
public Iterator<Pair<K,V>> iterator()
iterator
in interface Iterable<Pair<K,V>>
public Schema getSchema()
FileReader
getSchema
in interface FileReader<Pair<K,V>>
public boolean hasNext()
hasNext
in interface Iterator<Pair<K,V>>
public Pair<K,V> next()
next
in interface Iterator<Pair<K,V>>
public Pair<K,V> next(Pair<K,V> reuse) throws IOException
FileReader
next
in interface FileReader<Pair<K,V>>
reuse
- an instance to reuse.
IOException
public void sync(long position) throws IOException
FileReader
FileReader.pastSync(long)
with the end point before each call to Iterator.next()
.
sync
in interface FileReader<Pair<K,V>>
IOException
public boolean pastSync(long position) throws IOException
FileReader
pastSync
in interface FileReader<Pair<K,V>>
IOException
public long tell() throws IOException
FileReader
tell
in interface FileReader<Pair<K,V>>
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |