Module datarush.library
Class AbstractRegexLogFormat
java.lang.Object
com.pervasive.datarush.operators.io.textfile.AbstractRegexLogFormat
- All Implemented Interfaces:
LogFormat
- Direct Known Subclasses:
CLFLogFormat,CombinedLogFormat,GenericLogFormat,GlassfishLogFormat,Log4jLogFormat,SyslogLogFormat
Skeleton implementation of a regular expression based LogFormat class.
Provides basic members, accessors, and a regular expression based parser.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyzeFormat(Reader input) Creates the analysis object based on the provided input.Get the value used for the log format patternGet the SupportedLogType of this format.abstract RecordTextSchema<?>Gets the record schema of the source.booleanIndicates if the format supports parsing of subsections of a file.protected abstract voidRefresh and recalculate the schema.setAnalysis(FormatAnalyzer.FormatAnalysis analysis) Sets the analysis object to use to determine meta-data.voidsetFormatPattern(String formatPattern) Set the value used for the log format patternMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pervasive.datarush.operators.io.textfile.LogFormat
createParser, getType
-
Field Details
-
formatPattern
-
logType
-
-
Constructor Details
-
AbstractRegexLogFormat
public AbstractRegexLogFormat()
-
-
Method Details
-
getLogType
Description copied from interface:LogFormatGet the SupportedLogType of this format.- Specified by:
getLogTypein interfaceLogFormat- Returns:
- the SupportedLogType this format implements
-
getFormatPattern
Get the value used for the log format pattern- Specified by:
getFormatPatternin interfaceLogFormat- Returns:
- the text value of the format pattern
-
setFormatPattern
Set the value used for the log format pattern- Specified by:
setFormatPatternin interfaceLogFormat- Parameters:
formatPattern- the value to use as the format pattern
-
getSchema
Gets the record schema of the source.- Returns:
- the record schema of the source
-
isSplittable
public boolean isSplittable()Description copied from interface:LogFormatIndicates if the format supports parsing of subsections of a file.A format should only return
trueif it can, at least in some situations, support this sort of parsing. If a format requires reading the entire file, it must returnfalse.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.
- Specified by:
isSplittablein interfaceLogFormat- Returns:
trueif the format supports parsing only a portion of the file,falseotherwise
-
analyzeFormat
Description copied from interface:LogFormatCreates the analysis object based on the provided input.- Specified by:
analyzeFormatin interfaceLogFormat- Parameters:
input- the input source to analyze- Returns:
- the analysis object
- Throws:
IOExceptionParseException
-
setAnalysis
Description copied from interface:LogFormatSets the analysis object to use to determine meta-data.- Specified by:
setAnalysisin interfaceLogFormat- Parameters:
analysis- the analysis object
-
refreshSchema
protected abstract void refreshSchema()Refresh and recalculate the schema. This is usually done after changing a setting.
-