@PublicEvolving public class TextValueInputFormat extends DelimitedInputFormat<StringValue>
FileInputFormat.FileBaseStatistics, FileInputFormat.InputSplitOpenThread
RECORD_DELIMITER
currentSplit, ENUMERATE_NESTED_FILES_FLAG, enumerateNestedFiles, filePath, INFLATER_INPUT_STREAM_FACTORIES, minSplitSize, numSplits, openTimeout, READ_WHOLE_SPLIT_FLAG, splitLength, splitStart, stream, unsplittable
Constructor and Description |
---|
TextValueInputFormat(Path filePath) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration parameters)
Configures this input format by reading the path to the file from the configuration and the string that
defines the record delimiter.
|
String |
getCharsetName() |
boolean |
isSkipInvalidLines() |
StringValue |
readRecord(StringValue reuse,
byte[] bytes,
int offset,
int numBytes)
This function parses the given byte array which represents a serialized record.
|
void |
setCharsetName(String charsetName) |
void |
setSkipInvalidLines(boolean skipInvalidLines) |
boolean |
supportsMultiPaths()
Override this method to supports multiple paths.
|
String |
toString() |
close, getBufferSize, getCharset, getCurrentState, getDelimiter, getLineLengthLimit, getNumLineSamples, getStatistics, loadConfigParameters, loadGlobalConfigParams, nextRecord, open, reachedEnd, readLine, reopen, setBufferSize, setCharset, setDelimiter, setDelimiter, setDelimiter, setLineLengthLimit, setNumLineSamples
acceptFile, createInputSplits, decorateInputStream, extractFileExtension, getFilePath, getFilePaths, getFileStats, getFileStats, getInflaterInputStreamFactory, getInputSplitAssigner, getMinSplitSize, getNestedFileEnumeration, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, registerInflaterInputStreamFactory, setFilePath, setFilePath, setFilePaths, setFilePaths, setFilesFilter, setMinSplitSize, setNestedFileEnumeration, setNumSplits, setOpenTimeout, testForUnsplittable
closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
public TextValueInputFormat(Path filePath)
public String getCharsetName()
public void setCharsetName(String charsetName)
public boolean isSkipInvalidLines()
public void setSkipInvalidLines(boolean skipInvalidLines)
public void configure(Configuration parameters)
DelimitedInputFormat
configure
in interface InputFormat<StringValue,FileInputSplit>
configure
in class DelimitedInputFormat<StringValue>
parameters
- The configuration object to read the parameters from.InputFormat.configure(org.apache.flink.configuration.Configuration)
public StringValue readRecord(StringValue reuse, byte[] bytes, int offset, int numBytes)
DelimitedInputFormat
readRecord
in class DelimitedInputFormat<StringValue>
reuse
- An optionally reusable object.bytes
- Binary data of serialized records.offset
- The offset where to start to read the record data.numBytes
- The number of bytes that can be read starting at the offset position.public String toString()
toString
in class FileInputFormat<StringValue>
public boolean supportsMultiPaths()
FileInputFormat
supportsMultiPaths
in class FileInputFormat<StringValue>
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.