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.Reader
implementation that reads the file using theFileInputFormat
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InputFormatBasedReader.Factory<T>
Factory forInputFormatBasedReader
.
-
Constructor Summary
Constructors Constructor Description InputFormatBasedReader(Path path, FileInputFormat<T> inputFormat)
-
-
-
Constructor Detail
-
InputFormatBasedReader
public InputFormatBasedReader(Path path, FileInputFormat<T> inputFormat) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public T read() throws IOException
- Specified by:
read
in interfaceRecordWiseFileCompactor.Reader<T>
- Returns:
- The next record, or null if no more available.
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
-