public abstract class AbstractRegexLogFormat extends Object implements LogFormat
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractRegexLogFormat.RegexParser |
Modifier and Type | Field and Description |
---|---|
protected String |
formatPattern |
protected SupportedLogType |
logType |
Constructor and Description |
---|
AbstractRegexLogFormat() |
Modifier and Type | Method and Description |
---|---|
FormatAnalyzer.FormatAnalysis |
analyzeFormat(Reader input)
Creates the analysis object based on the provided input.
|
String |
getFormatPattern()
Get the value used for the log format pattern
|
SupportedLogType |
getLogType()
Get the SupportedLogType of this format.
|
abstract RecordTextSchema<?> |
getSchema()
Gets the record schema of the source.
|
boolean |
isSplittable()
Indicates if the format supports parsing of subsections
of a file.
|
protected abstract void |
refreshSchema()
Refresh and recalculate the schema.
|
LogFormat |
setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Sets the analysis object to use to determine meta-data.
|
void |
setFormatPattern(String formatPattern)
Set the value used for the log format pattern
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createParser, getType
protected String formatPattern
protected SupportedLogType logType
public SupportedLogType getLogType()
LogFormat
getLogType
in interface LogFormat
public String getFormatPattern()
getFormatPattern
in interface LogFormat
public void setFormatPattern(String formatPattern)
setFormatPattern
in interface LogFormat
formatPattern
- the value to use as the format patternpublic abstract RecordTextSchema<?> getSchema()
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 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)
LogFormat
setAnalysis
in interface LogFormat
analysis
- the analysis objectprotected abstract void refreshSchema()
Copyright © 2024 Actian Corporation. All rights reserved.