public class RowCsvInputFormat extends AbstractCsvInputFormat<org.apache.flink.types.Row>
Row.
Different from old csv org.apache.flink.api.java.io.RowCsvInputFormat: 1.New csv will
emit this row (Fill null the remaining fields) when row is too short. But Old csv will skip this
too short row. 2.New csv, escape char will be removed. But old csv will keep the escape char.
These can be continuously improved in new csv input format: 1.New csv not support configure comment char. The comment char is "#". 2.New csv not support configure multi chars field delimiter. 3.New csv not support read first N, it will throw exception. 4.Only support configure line delimiter: "\r" or "\n" or "\r\n".
| Modifier and Type | Class and Description |
|---|---|
static class |
RowCsvInputFormat.Builder
A builder for creating a
RowCsvInputFormat. |
csvInputStream, csvSchema| Modifier and Type | Method and Description |
|---|---|
static RowCsvInputFormat.Builder |
builder(org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo,
org.apache.flink.core.fs.Path... filePaths)
Create a builder.
|
org.apache.flink.types.Row |
nextRecord(org.apache.flink.types.Row record) |
void |
open(org.apache.flink.core.fs.FileInputSplit split) |
boolean |
reachedEnd() |
supportsMultiPathsacceptFile, close, configure, createInputSplits, decorateInputStream, extractFileExtension, getFilePath, getFilePaths, getFileStats, getFileStats, getInflaterInputStreamFactory, getInputSplitAssigner, getMinSplitSize, getNestedFileEnumeration, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, getStatistics, registerInflaterInputStreamFactory, setFilePath, setFilePath, setFilePaths, setFilePaths, setFilesFilter, setMinSplitSize, setNestedFileEnumeration, setNumSplits, setOpenTimeout, testForUnsplittable, toStringpublic void open(org.apache.flink.core.fs.FileInputSplit split)
throws IOException
open in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.types.Row,org.apache.flink.core.fs.FileInputSplit>open in class AbstractCsvInputFormat<org.apache.flink.types.Row>IOExceptionpublic boolean reachedEnd()
public org.apache.flink.types.Row nextRecord(org.apache.flink.types.Row record)
throws IOException
IOExceptionpublic static RowCsvInputFormat.Builder builder(org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> typeInfo, org.apache.flink.core.fs.Path... filePaths)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.