Class CrawlLogLinesMatchingRegexp
- java.lang.Object
-
- dk.netarkivet.common.utils.batch.FileBatchJob
-
- dk.netarkivet.common.utils.archive.ArchiveBatchJobBase
-
- dk.netarkivet.common.utils.archive.ArchiveBatchJob
-
- dk.netarkivet.viewerproxy.webinterface.CrawlLogLinesMatchingRegexp
-
- All Implemented Interfaces:
Serializable
public class CrawlLogLinesMatchingRegexp extends ArchiveBatchJob
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 theFileBatchJob.processOnlyFilesMatching(String)
construct.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
FileBatchJob.ExceptionOccurrence
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.common.utils.archive.ArchiveBatchJobBase
noOfRecordsProcessed
-
Fields inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
batchJobTimeout, exceptions, filesFailed, noOfFilesProcessed
-
-
Constructor Summary
Constructors Constructor Description CrawlLogLinesMatchingRegexp(String regexp)
Initialise the batch job.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish(OutputStream os)
Does nothing, no finishing is needed.ArchiveBatchFilter
getFilter()
Returns an ArchiveBatchFilter object which restricts the set of records in the archive on which this batch-job is performed.void
initialize(OutputStream os)
Does nothing, no initialisation is needed.void
processRecord(ArchiveRecordBase record, OutputStream os)
Process a record on crawl log concerning the given domain to result.String
toString()
-
Methods inherited from class dk.netarkivet.common.utils.archive.ArchiveBatchJob
processFile
-
Methods inherited from class dk.netarkivet.common.utils.archive.ArchiveBatchJobBase
getExceptionArray, handleException, handleOurException, noOfRecordsProcessed
-
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
-
-
-
-
Constructor Detail
-
CrawlLogLinesMatchingRegexp
public CrawlLogLinesMatchingRegexp(String regexp)
Initialise the batch job.- Parameters:
regexp
- The regexp to match in the crawl.log lines.
-
-
Method Detail
-
initialize
public void initialize(OutputStream os)
Does nothing, no initialisation is needed.- Specified by:
initialize
in classArchiveBatchJobBase
- Parameters:
os
- Not used.
-
getFilter
public ArchiveBatchFilter getFilter()
Description copied from class:ArchiveBatchJob
Returns an ArchiveBatchFilter object which restricts the set of records in the archive on which this batch-job is performed. The default value is a neutral filter which allows all records.- Overrides:
getFilter
in classArchiveBatchJob
- Returns:
- A filter telling which records should be given to processRecord().
-
processRecord
public void processRecord(ArchiveRecordBase record, OutputStream os)
Process a record on crawl log concerning the given domain to result.- Specified by:
processRecord
in classArchiveBatchJob
- Parameters:
record
- The record to process.os
- The output stream for the result.- Throws:
ArgumentNotValid
- on null parametersIOFailure
- on trouble processing the record.
-
finish
public void finish(OutputStream os)
Does nothing, no finishing is needed.- Specified by:
finish
in classArchiveBatchJobBase
- Parameters:
os
- Not used.
-
-