@PublicEvolving public static interface StreamFormat.Reader<T> extends Closeable
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 AutoCloseableclose 在接口中 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–2022 The Apache Software Foundation. All rights reserved.