public class CsvInputFormat<OUT extends Tuple> extends GenericCsvInputFormat<OUT>
DelimitedInputFormat.AbstractConfigBuilder<T>, DelimitedInputFormat.ConfigBuilderFileInputFormat.FileBaseStatistics, FileInputFormat.InputSplitOpenThread| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_FIELD_DELIMITER |
static String |
DEFAULT_LINE_DELIMITER |
RECORD_DELIMITERDEFLATE_SUFFIX, filePath, minSplitSize, numSplits, openTimeout, READ_WHOLE_SPLIT_FLAG, splitLength, splitStart, stream, unsplittable| Constructor and Description |
|---|
CsvInputFormat(Path filePath) |
CsvInputFormat(Path filePath,
Class<?>... types) |
CsvInputFormat(Path filePath,
String lineDelimiter,
char fieldDelimiter,
Class<?>... types) |
| Modifier and Type | Method and Description |
|---|---|
Class<?>[] |
getFieldTypes() |
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) |
String |
toString() |
getFieldDelimiter, getFieldParsers, getGenericFieldTypes, getNumberOfFieldsTotal, getNumberOfNonNullFields, isLenient, isSkippingFirstLineAsHeader, parseRecord, setFieldDelimiter, setFieldsGeneric, setFieldsGeneric, setFieldTypesGeneric, setLenient, setSkipFirstLineAsHeader, skipFieldsclose, configure, configureDelimitedFormat, getBufferSize, getDelimiter, getLineLengthLimit, getNumLineSamples, getStatistics, loadGloablConfigParams, nextRecord, reachedEnd, readLine, setBufferSize, setDelimiter, setDelimiter, setDelimiter, setDelimiter, setDelimiter, setLineLengthLimit, setNumLineSamplesacceptFile, configureFileFormat, createInputSplits, getFilePath, getFileStats, getInputSplitType, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeoutpublic static final String DEFAULT_LINE_DELIMITER
public static final char DEFAULT_FIELD_DELIMITER
public CsvInputFormat(Path filePath)
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 extends Tuple,FileInputSplit>open in class GenericCsvInputFormat<OUT extends Tuple>IOExceptionpublic OUT readRecord(OUT reuse, byte[] bytes, int offset, int numBytes)
readRecord in class DelimitedInputFormat<OUT extends Tuple>public String toString()
toString in class FileInputFormat<OUT extends Tuple>Copyright © 2014 The Apache Software Foundation. All rights reserved.