Modifier and Type | Field and Description |
---|---|
protected String |
formatPattern |
protected SupportedLogType |
logType |
protected RecordTextSchema<?> |
schema |
Constructor and Description |
---|
ELFLogFormat()
Create a log format for accessing Extended Log Format data.
|
ELFLogFormat(String formatPattern)
Create a log format for accessing Extended Log Format data.
|
Modifier and Type | Method and Description |
---|---|
FormatAnalyzer.FormatAnalysis |
analyzeFormat(Reader input)
Creates the analysis object based on the provided input.
|
DataFormat.DataParser |
createParser(ParsingOptions options,
CharsetEncoding charEncoding,
String newline) |
String |
getFormatPattern()
Get the value used for the log format pattern
|
SupportedLogType |
getLogType()
Get the SupportedLogType of this format.
|
RecordTextSchema<?> |
getSchema()
Gets the record schema of the source.
|
RecordTokenType |
getType()
Gets the record type associated with the format.
|
boolean |
isSplittable()
Indicates if the format supports parsing of subsections
of a file.
|
protected void |
refreshSchema() |
LogFormat |
setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Sets the ELF analysis object to use
to determine the schema and other meta-data.
|
void |
setFormatPattern(String formatPattern)
Set the value used for the log format pattern
|
protected String formatPattern
protected RecordTextSchema<?> schema
protected SupportedLogType logType
public ELFLogFormat()
public ELFLogFormat(String formatPattern)
formatPattern
- the fields directive that defines the schemapublic String getFormatPattern()
getFormatPattern
in interface LogFormat
public void setFormatPattern(String formatPattern)
setFormatPattern
in interface LogFormat
formatPattern
- the value to use as the format patternprotected void refreshSchema()
public FormatAnalyzer.FormatAnalysis analyzeFormat(Reader input) throws IOException, ParseException
LogFormat
analyzeFormat
in interface LogFormat
input
- the input source to analyzeIOException
ParseException
public LogFormat setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
setAnalysis
in interface LogFormat
analysis
- the ELF analysis objectpublic SupportedLogType getLogType()
LogFormat
getLogType
in interface LogFormat
public RecordTextSchema<?> getSchema()
public RecordTokenType getType()
LogFormat
For many formats, this may be derived from a schema object describing the format layout.
public boolean isSplittable()
LogFormat
A format should only return true
if it can,
at least in some situations, support this sort of parsing.
If a format requires reading the entire file, it
must return false
.
If a format is not splittable, a file in the format cannot be parsed in parallel; however, individual files can still be parsed independently in parallel, as when reading the contents of a directory or using a file globbing pattern.
isSplittable
in interface LogFormat
true
if the format supports parsing
only a portion of the file, false
otherwisepublic DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
createParser
in interface LogFormat
Copyright © 2024 Actian Corporation. All rights reserved.