public class RegexInputFormat extends Object implements InputFormat
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_KEY |
TYPE_PROPERTY
Constructor and Description |
---|
RegexInputFormat(String pattern,
String listDelimiter,
List<String> columns) |
Modifier and Type | Method and Description |
---|---|
InputEntityReader |
createReader(InputRowSchema inputRowSchema,
InputEntity source,
File temporaryDirectory) |
List<String> |
getColumns() |
String |
getListDelimiter() |
String |
getPattern() |
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.
|
boolean |
isSplittable()
Trait to indicate that a file can be split into multiple
InputSplit s. |
public static final String TYPE_KEY
public String getPattern()
public boolean isSplittable()
InputFormat
InputSplit
s.
This method is not being used anywhere for now, but should be considered
in SplittableInputSource.createSplits(org.apache.druid.data.input.InputFormat, org.apache.druid.data.input.SplitHintSpec)
in the future.
isSplittable
in interface InputFormat
public InputEntityReader createReader(InputRowSchema inputRowSchema, InputEntity source, File temporaryDirectory)
createReader
in interface InputFormat
public long getWeightedSize(String path, long size)
InputFormat
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.getWeightedSize
in interface InputFormat
path
- The path of the input object. Used to tell whether any compression is used.size
- The size of the input object in bytes.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.