Package org.apache.druid.data.input.impl
Class FlatTextInputFormat
java.lang.Object
org.apache.druid.data.input.impl.FlatTextInputFormat
- All Implemented Interfaces:
InputFormat
- Direct Known Subclasses:
CsvInputFormat,DelimitedInputFormat
-
Field Summary
Fields inherited from interface org.apache.druid.data.input.InputFormat
TYPE_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptioncreateRowAdapter(InputRowSchema inputRowSchema) Returns an adapter that can read the rows fromInputFormat.createReader(InputRowSchema, InputEntity, File), given a particularInputRowSchema.booleanprotected StringintlonggetWeightedSize(String path, long size) Computes the weighted size of a given input object of the underyling input format type, weighted for its cost during ingestion.inthashCode()booleanbooleanprotected booleanWhether this format can useListBasedInputRow, which are preferred overMapBasedInputRowwhen possible.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.data.input.InputFormat
createReader, isSplittable
-
Method Details
-
getDelimiter
-
getColumns
-
getListDelimiter
-
isFindColumnsFromHeader
public boolean isFindColumnsFromHeader() -
getSkipHeaderRows
public int getSkipHeaderRows() -
shouldTryParseNumbers
public boolean shouldTryParseNumbers() -
getWeightedSize
Description copied from interface:InputFormatComputes the weighted size of a given input object of the underyling input format type, weighted for its cost during ingestion. The weight calculated is dependent on the format type and compression type (CompressionUtils.Format) used if any. Uncompressed newline delimited json is used as baseline with scale factor 1. This means that when computing the byte weight that an uncompressed newline delimited json input object has towards ingestion, we take the file size as is, 1:1.- Specified by:
getWeightedSizein interfaceInputFormat- Parameters:
path- The path of the input object. Used to tell whether any compression is used.size- The size of the input object in bytes.- Returns:
- The weighted size of the input object.
-
createRowAdapter
Description copied from interface:InputFormatReturns an adapter that can read the rows fromInputFormat.createReader(InputRowSchema, InputEntity, File), given a particularInputRowSchema. Note thatRowAdapters.standardRow()always works, but the one returned by this method may be more performant.- Specified by:
createRowAdapterin interfaceInputFormat
-
equals
-
hashCode
public int hashCode() -
useListBasedInputRows
protected boolean useListBasedInputRows()Whether this format can useListBasedInputRow, which are preferred overMapBasedInputRowwhen possible. Subclasses pass this toDelimitedValueReader. -
fieldsToString
-