dk.netarkivet.viewerproxy.reporting
Class CrawlLogLinesMatchingRegexp
java.lang.Object
dk.netarkivet.common.utils.batch.FileBatchJob
dk.netarkivet.common.utils.arc.ARCBatchJob
dk.netarkivet.viewerproxy.reporting.CrawlLogLinesMatchingRegexp
- All Implemented Interfaces:
- java.io.Serializable
public class CrawlLogLinesMatchingRegexp
- extends ARCBatchJob
Batchjob that extracts lines from a crawl log matching a regular expression
The batch job should be restricted to run on metadata files for a specific
job only, using the FileBatchJob.processOnlyFilesMatching(String)
construct.
- See Also:
- Serialized Form
Method Summary |
void |
finish(java.io.OutputStream os)
Does nothing, no finishing is needed. |
ARCBatchFilter |
getFilter()
returns a BatchFilter object which restricts the set of arcrecords in the
archive on which this batch-job is performed. |
void |
initialize(java.io.OutputStream os)
Does nothing, no initialisation is needed. |
void |
processRecord(org.archive.io.arc.ARCRecord record,
java.io.OutputStream os)
Process a record on crawl log concerning the given domain to result. |
java.lang.String |
toString()
|
Methods inherited from class dk.netarkivet.common.utils.batch.FileBatchJob |
addException, addFinishException, addInitializeException, getBatchJobTimeout, getExceptions, getFilenamePattern, getFilesFailed, getNoOfFilesProcessed, maxExceptionsReached, postProcess, processOnlyFileNamed, processOnlyFilesMatching, processOnlyFilesMatching, processOnlyFilesNamed, setBatchJobTimeout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CrawlLogLinesMatchingRegexp
public CrawlLogLinesMatchingRegexp(java.lang.String regexp)
- Initialise the batch job.
- Parameters:
regexp
- The regexp to match in the crawl.log lines.
initialize
public void initialize(java.io.OutputStream os)
- Does nothing, no initialisation is needed.
- Specified by:
initialize
in class ARCBatchJob
- Parameters:
os
- Not used.
getFilter
public ARCBatchFilter getFilter()
- Description copied from class:
ARCBatchJob
- returns a BatchFilter object which restricts the set of arcrecords in the
archive on which this batch-job is performed. The default value is
a neutral filter which allows all records.
- Overrides:
getFilter
in class ARCBatchJob
- Returns:
- A filter telling which records should be given to
processRecord().
processRecord
public void processRecord(org.archive.io.arc.ARCRecord record,
java.io.OutputStream os)
- Process a record on crawl log concerning the given domain to result.
- Specified by:
processRecord
in class ARCBatchJob
- Parameters:
record
- The record to process.os
- The output stream for the result.
- Throws:
ArgumentNotValid
- on null parameters
IOFailure
- on trouble processing the record.
finish
public void finish(java.io.OutputStream os)
- Does nothing, no finishing is needed.
- Specified by:
finish
in class ARCBatchJob
- Parameters:
os
- Not used.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object