@PublicEvolving public class PrimitiveInputFormat<OT> extends DelimitedInputFormat<OT>
CsvInputFormat
is that it won't go through Tuple1
.FileInputFormat.FileBaseStatistics, FileInputFormat.InputSplitOpenThread
currBuffer, currLen, currOffset, 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 |
---|
PrimitiveInputFormat(Path filePath,
Class<OT> primitiveClass) |
PrimitiveInputFormat(Path filePath,
String delimiter,
Class<OT> primitiveClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
initializeSplit(FileInputSplit split,
Long offset)
Initialization method that is called after opening or reopening an input split.
|
OT |
readRecord(OT reuse,
byte[] bytes,
int offset,
int numBytes)
This function parses the given byte array which represents a serialized record.
|
close, configure, 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, supportsMultiPaths, testForUnsplittable, toString
closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
protected void initializeSplit(FileInputSplit split, Long offset) throws IOException
DelimitedInputFormat
initializeSplit
in class DelimitedInputFormat<OT>
split
- Split that was opened or reopenedoffset
- Checkpointed state if the split was reopenedIOException
public OT readRecord(OT reuse, byte[] bytes, int offset, int numBytes) throws IOException
DelimitedInputFormat
readRecord
in class DelimitedInputFormat<OT>
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.IOException
- if the record could not be read.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.