public static interface FileRecordFormat.Reader<T> extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader to release all resources.
|
default CheckpointedPosition |
getCheckpointedPosition()
Optionally returns the current position of the reader.
|
T |
read()
Reads the next record.
|
@Nullable T read() throws IOException
null when the input has reached its end.IOExceptionvoid close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOException@Nullable default CheckpointedPosition getCheckpointedPosition()
The current position of the reader is the position of the next record that will be returned
in a call to read(). This can be implemented by readers that want to speed up recovery
from a checkpoint.
See the top-level class comment (section "Checkpointing") for details.
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.