- java.lang.Object
-
- com.pervasive.datarush.operators.io.textfile.ELFLogFormat
-
-
Field Summary
Fields Modifier and Type Field Description protected StringformatPatternprotected SupportedLogTypelogTypeprotected RecordTextSchema<?>schema
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatAnalyzer.FormatAnalysisanalyzeFormat(Reader input)Creates the analysis object based on the provided input.DataFormat.DataParsercreateParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)StringgetFormatPattern()Get the value used for the log format patternSupportedLogTypegetLogType()Get the SupportedLogType of this format.RecordTextSchema<?>getSchema()Gets the record schema of the source.RecordTokenTypegetType()Gets the record type associated with the format.booleanisSplittable()Indicates if the format supports parsing of subsections of a file.protected voidrefreshSchema()LogFormatsetAnalysis(FormatAnalyzer.FormatAnalysis analysis)Sets the ELF analysis object to use to determine the schema and other meta-data.voidsetFormatPattern(String formatPattern)Set the value used for the log format pattern
-
-
-
Field Detail
-
formatPattern
protected String formatPattern
-
schema
protected RecordTextSchema<?> schema
-
logType
protected SupportedLogType logType
-
-
Constructor Detail
-
ELFLogFormat
public ELFLogFormat()
Create a log format for accessing Extended Log Format data.
-
ELFLogFormat
public ELFLogFormat(String formatPattern)
Create a log format for accessing Extended Log Format data.- Parameters:
formatPattern- the fields directive that defines the schema
-
-
Method Detail
-
getFormatPattern
public String getFormatPattern()
Get the value used for the log format pattern- Specified by:
getFormatPatternin interfaceLogFormat- Returns:
- the text value of the format pattern
-
setFormatPattern
public void setFormatPattern(String formatPattern)
Set the value used for the log format pattern- Specified by:
setFormatPatternin interfaceLogFormat- Parameters:
formatPattern- the value to use as the format pattern
-
refreshSchema
protected void refreshSchema()
-
analyzeFormat
public FormatAnalyzer.FormatAnalysis analyzeFormat(Reader input) throws IOException, ParseException
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
public LogFormat setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Sets the ELF analysis object to use to determine the schema and other meta-data.- Specified by:
setAnalysisin interfaceLogFormat- Parameters:
analysis- the ELF analysis object
-
getLogType
public SupportedLogType getLogType()
Description copied from interface:LogFormatGet the SupportedLogType of this format.- Specified by:
getLogTypein interfaceLogFormat- Returns:
- the SupportedLogType this format implements
-
getSchema
public RecordTextSchema<?> getSchema()
Gets the record schema of the source.- Returns:
- the record schema of the source
-
getType
public RecordTokenType getType()
Description copied from interface:LogFormatGets the record type associated with the format. Records produced by the associated parser or consumed by the associated formatter will be of this type.For many formats, this may be derived from a schema object describing the format layout.
-
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
-
createParser
public DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
- Specified by:
createParserin interfaceLogFormat
-
-