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
  • Method Details

    • getDelimiter

      public String getDelimiter()
    • getColumns

      public List<String> getColumns()
    • getListDelimiter

      @Nullable public String getListDelimiter()
    • isFindColumnsFromHeader

      public boolean isFindColumnsFromHeader()
    • getSkipHeaderRows

      public int getSkipHeaderRows()
    • shouldTryParseNumbers

      public boolean shouldTryParseNumbers()
    • 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 interface InputFormat
      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

      public RowAdapter<InputRow> createRowAdapter(InputRowSchema inputRowSchema)
      Description copied from interface: InputFormat
      Returns an adapter that can read the rows from InputFormat.createReader(InputRowSchema, InputEntity, File), given a particular InputRowSchema. Note that RowAdapters.standardRow() always works, but the one returned by this method may be more performant.
      Specified by:
      createRowAdapter in interface InputFormat
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • useListBasedInputRows

      protected boolean useListBasedInputRows()
      Whether this format can use ListBasedInputRow, which are preferred over MapBasedInputRow when possible. Subclasses pass this to DelimitedValueReader.
    • fieldsToString

      protected String fieldsToString()