P
- The type of partition.OUT
- The type of returned record.@Internal public interface PartitionReader<P,OUT> extends Closeable, Serializable
This reader should only use in non-parallel instance, e.g. : used by lookup function.
Modifier and Type | Method and 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.
|
void open(List<P> partitions) throws IOException
IOException
@Nullable OUT read(OUT reuse) throws IOException
When this method is called, the reader it guaranteed to be opened.
reuse
- Object that may be reused.IOException
void close() throws IOException
When this method is called, the reader it guaranteed to be opened.
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.