Class InputFormatBasedReader<T>
- java.lang.Object
-
- org.apache.flink.connector.file.sink.compactor.InputFormatBasedReader<T>
-
- All Implemented Interfaces:
AutoCloseable,RecordWiseFileCompactor.Reader<T>
@PublicEvolving public class InputFormatBasedReader<T> extends Object implements RecordWiseFileCompactor.Reader<T>
ARecordWiseFileCompactor.Readerimplementation that reads the file using theFileInputFormat.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInputFormatBasedReader.Factory<T>Factory forInputFormatBasedReader.
-
Constructor Summary
Constructors Constructor Description InputFormatBasedReader(org.apache.flink.core.fs.Path path, org.apache.flink.api.common.io.FileInputFormat<T> inputFormat)
-
-
-
Constructor Detail
-
InputFormatBasedReader
public InputFormatBasedReader(org.apache.flink.core.fs.Path path, org.apache.flink.api.common.io.FileInputFormat<T> inputFormat) throws IOException- Throws:
IOException
-
-
Method Detail
-
read
public T read() throws IOException
- Specified by:
readin interfaceRecordWiseFileCompactor.Reader<T>- Returns:
- The next record, or null if no more available.
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
-