public class CsvInputFormat<OUT extends Tuple> extends GenericCsvInputFormat<OUT>
DelimitedInputFormat.AbstractConfigBuilder<T>, DelimitedInputFormat.ConfigBuilder
FileInputFormat.FileBaseStatistics, FileInputFormat.InputSplitOpenThread
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_FIELD_DELIMITER |
static String |
DEFAULT_LINE_DELIMITER |
RECORD_DELIMITER
DEFLATE_SUFFIX, enumerateNestedFiles, 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 |
---|---|
void |
close() |
byte[] |
getCommentPrefix() |
Class<?>[] |
getFieldTypes() |
OUT |
nextRecord(OUT record) |
void |
open(FileInputSplit split) |
OUT |
readRecord(OUT reuse,
byte[] bytes,
int offset,
int numBytes) |
void |
setCommentPrefix(byte[] commentPrefix) |
void |
setCommentPrefix(char commentPrefix) |
void |
setCommentPrefix(String commentPrefix) |
void |
setCommentPrefix(String commentPrefix,
Charset charset) |
void |
setCommentPrefix(String commentPrefix,
String charsetName) |
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, skipFields
configure, configureDelimitedFormat, getBufferSize, getDelimiter, getLineLengthLimit, getNumLineSamples, getStatistics, loadGloablConfigParams, reachedEnd, readLine, setBufferSize, setDelimiter, setDelimiter, setDelimiter, setDelimiter, setDelimiter, setLineLengthLimit, setNumLineSamples
acceptFile, configureFileFormat, createInputSplits, getFilePath, getFileStats, getInputSplitAssigner, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeout, testForUnsplittable
public static final String DEFAULT_LINE_DELIMITER
public static final char DEFAULT_FIELD_DELIMITER
public CsvInputFormat(Path filePath)
public byte[] getCommentPrefix()
public void setCommentPrefix(byte[] commentPrefix)
public void setCommentPrefix(char commentPrefix)
public void setCommentPrefix(String commentPrefix)
public void setCommentPrefix(String commentPrefix, String charsetName) throws IllegalCharsetNameException, UnsupportedCharsetException
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>
IOException
public void close() throws IOException
close
in interface InputFormat<OUT extends Tuple,FileInputSplit>
close
in class DelimitedInputFormat<OUT extends Tuple>
IOException
public OUT nextRecord(OUT record) throws IOException
nextRecord
in interface InputFormat<OUT extends Tuple,FileInputSplit>
nextRecord
in class DelimitedInputFormat<OUT extends Tuple>
IOException
public OUT readRecord(OUT reuse, byte[] bytes, int offset, int numBytes) throws IOException
readRecord
in class DelimitedInputFormat<OUT extends Tuple>
IOException
public String toString()
toString
in class FileInputFormat<OUT extends Tuple>
Copyright © 2015 The Apache Software Foundation. All rights reserved.