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
public abstract class FlatTextInputFormat extends Object implements InputFormat
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.data.input.InputFormat
TYPE_PROPERTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
protected String
fieldsToString()
List<String>
getColumns()
String
getDelimiter()
String
getListDelimiter()
int
getSkipHeaderRows()
long
getWeightedSize(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.int
hashCode()
boolean
isFindColumnsFromHeader()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.data.input.InputFormat
createReader, isSplittable
-
-
-
-
Method Detail
-
getDelimiter
public String getDelimiter()
-
isFindColumnsFromHeader
public boolean isFindColumnsFromHeader()
-
getSkipHeaderRows
public int getSkipHeaderRows()
-
getWeightedSize
public long getWeightedSize(String path, long size)
Description copied from interface:InputFormat
Computes 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:
getWeightedSize
in 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.
-
fieldsToString
protected String fieldsToString()
-
-