java.lang.AutoCloseable, LogParserpublic class BaseLogParser extends java.lang.Object implements LogParser
LogParser. It wraps a
SingleLineParser from the Configuration to parse a log
dir/file.| Constructor | Description |
|---|---|
BaseLogParser() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Release the resource used by the ParserUtil.
|
void |
init(org.apache.hadoop.conf.Configuration config,
HistorySkylineStore skylineStore) |
Initializing the LogParser, including loading solver parameters from
configuration file.
|
void |
parseLine(java.lang.String logLine,
java.util.Map<java.lang.String,JobMetaData> jobMetas,
java.util.Map<RecurrenceId,java.util.List<ResourceSkyline>> skylineRecords) |
|
void |
parseStream(java.io.InputStream logs) |
Parses each line in the log stream, and adds extracted
ResourceSkylines to the
SkylineStore. |
public void init(org.apache.hadoop.conf.Configuration config,
HistorySkylineStore skylineStore)
throws ResourceEstimatorException
LogParserinit in interface LogParserconfig - Configuration for the LogParser.skylineStore - the HistorySkylineStore which stores recurring
pipeline's
ResourceSkylines.ResourceEstimatorException - if initialization of a
SingleLineParser fails.public void parseLine(java.lang.String logLine,
java.util.Map<java.lang.String,JobMetaData> jobMetas,
java.util.Map<RecurrenceId,java.util.List<ResourceSkyline>> skylineRecords)
throws DataFieldNotFoundException,
java.text.ParseException
DataFieldNotFoundExceptionjava.text.ParseExceptionpublic final void parseStream(java.io.InputStream logs)
throws SkylineStoreException,
java.io.IOException
LogParserResourceSkylines to the
SkylineStore.parseStream in interface LogParserlogs - the stream of input logs.SkylineStoreException - if it fails to addHistory extracted
ResourceSkylines to the SkylineStore.java.io.IOException - if it fails to read from the InputStream.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.