public abstract class CommonCsvInputFormat<OUT> extends GenericCsvInputFormat<OUT>
DelimitedInputFormat.AbstractConfigBuilder<T>, DelimitedInputFormat.ConfigBuilderFileInputFormat.FileBaseStatistics, FileInputFormat.InputSplitOpenThread| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FIELD_DELIMITER |
static String |
DEFAULT_LINE_DELIMITER |
protected Object[] |
parsedValues |
commentCount, commentPrefix, fieldIncluded, invalidLineCount, lineDelimiterIsLinebreakRECORD_DELIMITERcurrentSplit, ENUMERATE_NESTED_FILES_FLAG, enumerateNestedFiles, filePath, INFLATER_INPUT_STREAM_FACTORIES, minSplitSize, numSplits, openTimeout, READ_WHOLE_SPLIT_FLAG, splitLength, splitStart, stream, unsplittable| Constructor and Description |
|---|
CommonCsvInputFormat(Path filePath,
CompositeType<OUT> typeInformation) |
CommonCsvInputFormat(Path filePath,
String lineDelimiter,
String fieldDelimiter,
CompositeType<OUT> compositeTypeInfo) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract OUT |
createTuple(OUT reuse) |
Class<?>[] |
getFieldTypes() |
OUT |
nextRecord(OUT record) |
void |
open(FileInputSplit split) |
OUT |
readRecord(OUT reuse,
byte[] bytes,
int offset,
int numBytes) |
void |
setFields(boolean[] sourceFieldMask,
Class<?>[] fieldTypes) |
void |
setFields(int[] sourceFieldIndices,
Class<?>[] fieldTypes) |
void |
setFieldTypes(Class<?>... fieldTypes) |
void |
setOrderOfPOJOFields(String[] fieldNames) |
checkAndCoSort, checkForMonotonousOrder, close, enableQuotedStringParsing, getCommentPrefix, getFieldDelimiter, getFieldParsers, getGenericFieldTypes, getNumberOfFieldsTotal, getNumberOfNonNullFields, isLenient, isSkippingFirstLineAsHeader, parseRecord, setCommentPrefix, setCommentPrefix, setCommentPrefix, setCommentPrefix, setCommentPrefix, setFieldDelimiter, setFieldDelimiter, setFieldDelimiter, setFieldsGeneric, setFieldsGeneric, setFieldTypesGeneric, setLenient, setSkipFirstLineAsHeader, skipFieldsconfigure, configureDelimitedFormat, getBufferSize, getDelimiter, getLineLengthLimit, getNumLineSamples, getStatistics, loadGloablConfigParams, reachedEnd, readLine, setBufferSize, setDelimiter, setDelimiter, setDelimiter, setLineLengthLimit, setNumLineSamplesacceptFile, configureFileFormat, createInputSplits, decorateInputStream, extractFileExtension, getFilePath, getFileStats, getInflaterInputStreamFactory, getInputSplitAssigner, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, registerInflaterInputStreamFactory, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeout, testForUnsplittable, toStringgetRuntimeContext, setRuntimeContextpublic static final String DEFAULT_LINE_DELIMITER
public static final String DEFAULT_FIELD_DELIMITER
protected transient Object[] parsedValues
public CommonCsvInputFormat(Path filePath, CompositeType<OUT> typeInformation)
public CommonCsvInputFormat(Path filePath, String lineDelimiter, String fieldDelimiter, CompositeType<OUT> compositeTypeInfo)
public void setOrderOfPOJOFields(String[] fieldNames)
public void setFieldTypes(Class<?>... fieldTypes)
public void setFields(int[] sourceFieldIndices,
Class<?>[] fieldTypes)
public void setFields(boolean[] sourceFieldMask,
Class<?>[] fieldTypes)
public Class<?>[] getFieldTypes()
public void open(FileInputSplit split) throws IOException
open in interface InputFormat<OUT,FileInputSplit>open in class GenericCsvInputFormat<OUT>IOExceptionpublic OUT nextRecord(OUT record) throws IOException
nextRecord in interface InputFormat<OUT,FileInputSplit>nextRecord in class DelimitedInputFormat<OUT>IOExceptionpublic OUT readRecord(OUT reuse, byte[] bytes, int offset, int numBytes) throws IOException
readRecord in class DelimitedInputFormat<OUT>IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.