|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.file.DataFileStream<D>
org.apache.avro.file.DataFileReader<D>
public class DataFileReader<D>
Random access to files written with DataFileWriter.
DataFileWriter| Constructor Summary | |
|---|---|
DataFileReader(File file,
DatumReader<D> reader)
Construct a reader for a file. |
|
DataFileReader(SeekableInput sin,
DatumReader<D> reader)
Construct a reader for a file. |
|
| Method Summary | |
|---|---|
protected void |
blockFinished()
|
boolean |
pastSync(long position)
Return true if past the next synchronization point after a position. |
void |
seek(long position)
Move to a specific, known synchronization point, one returned from DataFileWriter.sync() while writing. |
void |
sync(long position)
Move to the next synchronization point after a position. |
| Methods inherited from class org.apache.avro.file.DataFileStream |
|---|
close, getMeta, getMetaLong, getMetaString, getSchema, hasNext, iterator, next, next, remove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataFileReader(File file,
DatumReader<D> reader)
throws IOException
IOException
public DataFileReader(SeekableInput sin,
DatumReader<D> reader)
throws IOException
IOException| Method Detail |
|---|
public void seek(long position)
throws IOException
DataFileWriter.sync() while writing. If synchronization points were not
saved while writing a file, use {#sync(long)} instead.
IOException
public void sync(long position)
throws IOException
pastSync(long) with the end point before each call to DataFileStream.next().
IOException
protected void blockFinished()
throws IOException
blockFinished in class DataFileStream<D>IOException
public boolean pastSync(long position)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||