Module datarush.library
Class GlassfishLogFormat
- java.lang.Object
-
- com.pervasive.datarush.operators.io.textfile.AbstractRegexLogFormat
-
- com.pervasive.datarush.operators.io.textfile.GlassfishLogFormat
-
- All Implemented Interfaces:
LogFormat
public class GlassfishLogFormat extends AbstractRegexLogFormat
Describes the format of a Glassfish log file. The format pattern specifies the date format used by the timestamp.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.pervasive.datarush.operators.io.textfile.AbstractRegexLogFormat
AbstractRegexLogFormat.RegexParser
-
-
Field Summary
Fields Modifier and Type Field Description protected RecordTextSchema<?>
schema
-
Fields inherited from class com.pervasive.datarush.operators.io.textfile.AbstractRegexLogFormat
formatPattern, logType
-
-
Constructor Summary
Constructors Constructor Description GlassfishLogFormat()
Create a log format for accessing Glasssfish log data.GlassfishLogFormat(String formatPattern)
Create a log format for accessing Glassfish log data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatAnalyzer.FormatAnalysis
analyzeFormat(Reader input)
Creates the analysis object based on the provided input.DataFormat.DataParser
createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
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()
Refresh and recalculate the schema.LogFormat
setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Sets the analysis object to use to determine meta-data.-
Methods inherited from class com.pervasive.datarush.operators.io.textfile.AbstractRegexLogFormat
getFormatPattern, getLogType, setFormatPattern
-
-
-
-
Field Detail
-
schema
protected RecordTextSchema<?> schema
-
-
Constructor Detail
-
GlassfishLogFormat
public GlassfishLogFormat()
Create a log format for accessing Glasssfish log data.
-
GlassfishLogFormat
public GlassfishLogFormat(String formatPattern)
Create a log format for accessing Glassfish log data.- Parameters:
formatPattern
- the timestamp format to use
-
-
Method Detail
-
getType
public RecordTokenType getType()
Description copied from interface:LogFormat
Gets 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.
- Returns:
- the format's record type
-
getSchema
public RecordTextSchema<?> getSchema()
Description copied from class:AbstractRegexLogFormat
Gets the record schema of the source.- Specified by:
getSchema
in classAbstractRegexLogFormat
- Returns:
- the record schema of the source
-
refreshSchema
protected void refreshSchema()
Description copied from class:AbstractRegexLogFormat
Refresh and recalculate the schema. This is usually done after changing a setting.- Specified by:
refreshSchema
in classAbstractRegexLogFormat
-
isSplittable
public boolean isSplittable()
Description copied from interface:LogFormat
Indicates if the format supports parsing of subsections of a file.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 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:
isSplittable
in interfaceLogFormat
- Overrides:
isSplittable
in classAbstractRegexLogFormat
- Returns:
true
if the format supports parsing only a portion of the file,false
otherwise
-
analyzeFormat
public FormatAnalyzer.FormatAnalysis analyzeFormat(Reader input) throws IOException, ParseException
Description copied from interface:LogFormat
Creates the analysis object based on the provided input.- Specified by:
analyzeFormat
in interfaceLogFormat
- Overrides:
analyzeFormat
in classAbstractRegexLogFormat
- Parameters:
input
- the input source to analyze- Returns:
- the analysis object
- Throws:
IOException
ParseException
-
setAnalysis
public LogFormat setAnalysis(FormatAnalyzer.FormatAnalysis analysis)
Description copied from interface:LogFormat
Sets the analysis object to use to determine meta-data.- Specified by:
setAnalysis
in interfaceLogFormat
- Overrides:
setAnalysis
in classAbstractRegexLogFormat
- Parameters:
analysis
- the analysis object
-
createParser
public DataFormat.DataParser createParser(ParsingOptions options, CharsetEncoding charEncoding, String newline)
-
-