public class GenericLogFormat extends AbstractRegexLogFormat
AbstractRegexLogFormat.RegexParser
Modifier and Type | Field and Description |
---|---|
protected RecordTextSchema<?> |
schema |
formatPattern, logType
Constructor and Description |
---|
GenericLogFormat()
Create a generic log format to read data using a regular expression.
|
GenericLogFormat(String formatPattern)
Create a generic log format to read data using a regular expression
|
Modifier and Type | Method and Description |
---|---|
DataFormat.DataParser |
createParser(ParsingOptions options,
CharsetEncoding charEncoding,
String newline) |
String |
getFormatPrefix() |
int |
getGroupCount()
Gets the number of matching groups in the format pattern.
|
int |
getPatternFlags() |
RecordTextSchema<?> |
getSchema()
Gets the record schema of the source.
|
RecordTokenType |
getType()
Gets the record type associated with the format.
|
protected void |
refreshSchema()
Refresh and recalculate the schema.
|
void |
setFormatPrefix(String formatPrefix) |
void |
setPatternFlags(int patternFlags) |
void |
setSchema(RecordTextSchema<?> schema)
Sets the record schema of the source.
|
analyzeFormat, getFormatPattern, getLogType, isSplittable, setAnalysis, setFormatPattern
protected RecordTextSchema<?> schema
public GenericLogFormat()
public GenericLogFormat(String formatPattern)
formatPattern
- the regular expression used in parsingpublic void setSchema(RecordTextSchema<?> schema)
schema
- the expected record schema of the sourcepublic int getGroupCount()
public int getPatternFlags()
public void setPatternFlags(int patternFlags)
public String getFormatPrefix()
public void setFormatPrefix(String formatPrefix)
public RecordTokenType getType()
LogFormat
For many formats, this may be derived from a schema object describing the format layout.
public RecordTextSchema<?> getSchema()
AbstractRegexLogFormat
getSchema
in class AbstractRegexLogFormat
protected void refreshSchema()
AbstractRegexLogFormat
refreshSchema
in class AbstractRegexLogFormat
public DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
Copyright © 2021 Actian Corporation. All rights reserved.