public class LineStreamFormat<T>
extends org.apache.flink.connector.file.src.reader.SimpleStreamFormat<T>
The reader uses Java's built-in InputStreamReader to decode the byte stream using
StandardCharsets.UTF_8.
NOTE: This class is based on Flink 1.15.0's TextLineInputFormat.
This format does not support optimized recovery from checkpoints. On recovery, it will re-read and discard the number of lines that were processed before the last checkpoint. That is due to the fact that the offsets of lines in the file cannot be tracked through the charset decoders with their internal buffering of stream input and charset decoder state.
| Constructor and Description |
|---|
LineStreamFormat(org.apache.flink.api.common.serialization.DeserializationSchema<T> deserializationSchema) |
| Modifier and Type | Method and Description |
|---|---|
org.wikimedia.eventutilities.flink.stream.LineStreamFormat.Reader<T> |
createReader(org.apache.flink.configuration.Configuration config,
org.apache.flink.core.fs.FSDataInputStream stream) |
org.apache.flink.api.common.typeinfo.TypeInformation<T> |
getProducedType() |
public LineStreamFormat(org.apache.flink.api.common.serialization.DeserializationSchema<T> deserializationSchema)
public org.wikimedia.eventutilities.flink.stream.LineStreamFormat.Reader<T> createReader(org.apache.flink.configuration.Configuration config, org.apache.flink.core.fs.FSDataInputStream stream)
createReader in class org.apache.flink.connector.file.src.reader.SimpleStreamFormat<T>public org.apache.flink.api.common.typeinfo.TypeInformation<T> getProducedType()
getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>getProducedType in interface org.apache.flink.connector.file.src.reader.StreamFormat<T>getProducedType in class org.apache.flink.connector.file.src.reader.SimpleStreamFormat<T>Copyright © 2025. All rights reserved.