Interface PartitionReader<P,OUT>
-
- Type Parameters:
P
- The type of partition.OUT
- The type of returned record.
- All Superinterfaces:
AutoCloseable
,Closeable
,Serializable
@Internal public interface PartitionReader<P,OUT> extends Closeable, Serializable
Reader that reads record from given partitions.This reader should only use in non-parallel instance, e.g. : used by lookup function.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the reader, this method should release all resources.void
open(List<P> partitions)
Opens the reader with given partitions.OUT
read(OUT reuse)
Reads the next record from the partitions.
-
-
-
Method Detail
-
open
void open(List<P> partitions) throws IOException
Opens the reader with given partitions.- Throws:
IOException
-
read
@Nullable OUT read(OUT reuse) throws IOException
Reads the next record from the partitions.When this method is called, the reader it guaranteed to be opened.
- Parameters:
reuse
- Object that may be reused.- Returns:
- Read record.
- Throws:
IOException
-
close
void close() throws IOException
Close the reader, this method should release all resources.When this method is called, the reader it guaranteed to be opened.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-