Class DecoderBasedReader<T>
java.lang.Object
org.apache.flink.connector.file.sink.compactor.DecoderBasedReader<T>
- All Implemented Interfaces:
AutoCloseable,RecordWiseFileCompactor.Reader<T>
@PublicEvolving
public class DecoderBasedReader<T>
extends Object
implements RecordWiseFileCompactor.Reader<T>
A
RecordWiseFileCompactor.Reader implementation that reads the file as an FSDataInputStream and decodes the record with the DecoderBasedReader.Decoder.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceADecoderBasedReader.Decoderto decode the file content into the actual records.static classFactory forDecoderBasedReader. -
Constructor Summary
ConstructorsConstructorDescriptionDecoderBasedReader(org.apache.flink.core.fs.Path path, DecoderBasedReader.Decoder<T> decoder) -
Method Summary
-
Constructor Details
-
DecoderBasedReader
public DecoderBasedReader(org.apache.flink.core.fs.Path path, DecoderBasedReader.Decoder<T> decoder) throws IOException - Throws:
IOException
-
-
Method Details
-
read
- Specified by:
readin interfaceRecordWiseFileCompactor.Reader<T>- Returns:
- The next record, or null if no more available.
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-