Commit Graph
698 Commits
Author SHA1 Message Date
gojomo a490737b59 * StatisticsTracker
add 'trackSources' to make hosts-by-source-tag report optional in large crawls, where it is very expensive (and an OOME risk until other changes are also made)
2011-07-20 23:36:19 +00:00
gojomo a69126ad21 Reduce redundant Pattern instance caching
* TextUtils
    maintain global Pattern soft-cache by regex string key
2011-07-20 23:04:26 +00:00
nlevitt b3e35499ca HER-1812 Spring-ify how reports are handled - based partly on patch from Kristinn Sigurðsson
* Report.java
    make StatisticsTracker stats an argument to write() instead of a field; new properties shouldReportAtEndOfCrawl and shouldReportDuringCrawl, both default true, but configurable if desired, replacing the LIVE_REPORTS/END_REPORTS stuff in StatisticsTracker
* StatisticsTracker.java
    new property "reports", a List<Report>, which defaults (with lazy initialization) to the same reports we've always had, replacing hard-coded lists of reports classes and related code
* profile-crawler-beans.cxml
    default reports list, commented out
* SeedsReport.java FrontierSummaryReport.java MimetypesReport.java SourceTagsReport.java FrontierNonemptyReport.java CrawlSummaryReport.java ResponseCodeReport.java HostsReport.java ProcessorsReport.java ToeThreadsReport.java
    update write(PrintWriter, StatisticsTracker) arguments
* JobResource.java
    replace use of StatisticsTracker.LIVE_REPORTS
2011-07-20 17:05:12 +00:00
nlevitt e9d53ec487 HER-1791 - a different implementation
* IdenticalDigestDecideRule.java
    fix javadoc typo
* CoreAttributeConstants.java
    "history-good-to-store" is history
* RecrawlAttributeConstants.java
    new "write-tag" constant
* PersistProcessor.java
    remove defunct "history-good-to-store" logic; nadd new option onlyStoreIfWriteTagPresent, and update shouldStore() to respect that option
* WriterPoolProcessor.java
    remove defunct "history-good-to-store" logic; new method copyForwardWriteTagIfDupe(); override innerRejectProcess() to call copyForwardWriteTagIfDupe()
* ARCWriterProcessor.java, WARCWriterProcessor.java
    remove defunct "history-good-to-store" logic; add writeTag to history on write; call copyForwardWriteTagIfDupe() on skipIdenticalDigest
2011-07-18 20:22:48 +00:00
gojomo 421164aaab * ConfigPathConfigurer
log as WARNING when snapshot not possible because launch directory not yet available
2011-07-16 17:49:11 +00:00
nlevitt 0676ded3f2 * CrawlJob.java
fix logging of job events
2011-07-16 00:48:14 +00:00
nlevitt f13b393dab * PersistLogProcessor.java
put default persist log path in launch directory
2011-07-16 00:44:13 +00:00
gojomo e819d197fe [HER-915] (contrib) add http proxy authentication
contributed by Adam Wilmer
* FetchHTTP.java
    properties, setup for http proxy user/password
* profile-crawler-beans.cxml
    commented-out example settings for proxy auth properties
2011-07-15 21:57:20 +00:00
gojomo 4221aee537 fix selftests
* selftest-crawler-beans.cxml
    write logs, arcs to old constant locations, for ease of post-test verification
2011-07-15 21:34:59 +00:00
nlevitt b90aa89e4b More on HER-1901 - fix build by refactoring launch dir initialization into PathSharingContext; refactor config path interpolation mostly into ConfigPathConfigurer; various tweaks
* ActionDirectory.java, CrawlerLoggerModule.java, StatisticsTracker.java, SurtPrefixedDecideRule.java, WriterPoolProcessor.java, profile-crawler-beans.cxml
    use camelcase ${launchId} 
* CheckpointService.java, JobResource.java
    rename getAvailableCheckpointDirectories() to findAvailableCheckpointDirectories() so that it's not treated as a bean property
* WriterPoolProcessor.java, WriterPoolSettingsData.java, WriterPoolMember.java
    rename getOutputDirs() to calcOutputDirs() so that it's not treated as a bean property
* ConfigPath.java
    let ConfigPathConfigurer to do interpolation of ${launchId}
* ConfigFile.java
    let ConfigPathConfigurer do the snapshotting of config file
* CrawlJob.java, PathSharingContext.java
    remove launchDir initialization out of CrawlJob into PathSharingContext
* ConfigPathConfigurer.java
    - remove special handling of WriterPoolProcessor store paths; instead, look in beans for ConfigPaths within Iterables
    - have each ConfigPath hold reference to this ConfigPathConfigurer to use for interpolating ${launchId} and snapshotting config files
2011-07-15 19:39:32 +00:00
gojomo 1bfbec8772 fix build; move Preformatter to package (commons) where first referenced 2011-07-15 19:02:14 +00:00
gojomo 2e10d07da2 [HER-741] Make extractors interrogate for charset
* ExtractorHTML
    fix reflexive probe to look as many characters in (1000) as initially
2011-07-14 06:53:56 +00:00
gojomo be12d1e8f3 calmer logging (fewer alerts in job.log/alerts.log/heritrix_out.log)
* Recorder
    object to unsupported content-encodings when first set
* FetchHTTP
    note as annotation unsupported content-encodings
* Link
    not as annotation when base URI is used for absent via
* ExtractorHTML
    downgrade char-sequence reading problem (often a chunking problem) to WARNING from SEVERE
2011-07-14 06:35:07 +00:00
gojomo 5e2e458469 * StoredQueue
(size) more robust against concurrent emptying
2011-07-14 06:24:14 +00:00
nlevitt 9eb0c137e8 HER-1901 twiddles
* CrawlJob.java
    decided to go with plain timestamp17 as launch id, no "launch-" prefix
* ConfigPathConfigurer.java
    refactored special remembering of WriterPoolProcessor storePaths out of fixupPaths()
2011-07-14 02:03:01 +00:00
gojomo 6a3072ef46 more rapidly release refs for finished CrawlURIs
* UriProcessingFormatter, Preformatter, GenerationFileHandler
    improve preformat-outside-synchronized optimization so that the LogRecord/CrawlURI doesn't linger until next displaces it
* CrawlURI
    (processingCleanup) null more of last-processing-run collected values
2011-07-14 01:14:04 +00:00
nlevitt c84e87c648 More HER-1901
* CrawlJob.java 
    job log in launch dir covering just that launch
2011-07-13 20:47:08 +00:00
nlevitt 4d966ae70b More on HER-1901 - support ${launch-id} interpolation on W/ARCWriterProcessor storePaths
* WriterPoolProcessor.java, ARCWriterProcessor.java, WARCWriterProcessor.java
    change type of storePaths to List<ConfigPath> and handle appropriately
* ConfigPathConfigurer.java
    fixupPaths() - old code did not touch WriterPoolProcessor storePaths, since they're deeply nested inside the bean, but they need to be remembered for later interpolation of ${launch-id}, so add special handling
2011-07-13 20:18:51 +00:00
nlevitt d5b299d1ef * CrawlJob.java
initLaunchId() - didn't mean for this method to be public
2011-07-13 20:13:13 +00:00
nlevitt c39c927447 * profile-crawler-beans.cxml
runWhileEmpty defaults to false
2011-07-13 19:20:45 +00:00
nlevitt 4250e07de9 HER-1901 timestamped subdirectory for each launch
* HardLinker.java
    renamed FilesystemLinkMaker.java
* FilesystemLinkMaker.java
    add support for symbolic links
* CLibrary.java
    new method symlink()
* BdbModule.java
    use new class name FilesystemLinkMaker
* CrawlJob.java
    at crawl launch, create launch directory launch-{timestamp17}, copy cxml there, symlink "current" to launch dir, inform ConfigPaths
* ConfigPath.java
    interpolate ${launch-id} in configured paths
* ConfigFile.java
    obtainReader() - snapshot config files to launch dir when they are read
* ActionDirectory.java
    default doneDir now ${launch-id}/actions-done
    actOn() - symlink from old style done dir action/done to done files
* SurtPrefixedDecideRule.java
    default surtsDumpFile now ${launch-id}/surts.dump
    pathsFixedUp() - this gets called at build time, but we don't want anything written to disk until launch time, so remove call to dumpSurtPrefixSet() here
* CrawlerLoggerModule.java
    default logs dir now ${launch-id}/logs
* StatisticsTracker.java 
    default reports dir now ${launch-id}/reports
* WriterPoolProcessor.java
    default writer base path now ${launch-id} 
* profile-crawler-beans.cxml
    update to reflect new default paths under launch dirs
* PropertyUtils.java
    fix javadoc typo
2011-07-13 19:18:55 +00:00
gojomo a8682ff1ff * TextSeedModule
(actOn) use ArchiveUtils.getBufferedReader so that seeds-files via action directory may optionally be gzipped (indicated by .gz suffix)
2011-07-09 02:13:52 +00:00
gojomo d742434b4e [HER-1911] make writer-pool 'maxActive' setting adjustable mid-crawl
* WriterPool
    make new LARGEST_MAX_ACTIVE (255) the capacity of the reuse-pool, so that the maxActive property may vary up to that and still work; also handle more gracefully the failure of trying to use a larger number than the capacity (writer gets closed early rather than left hanging open)
2011-07-08 21:59:05 +00:00
gojomo a41809b8a7 [HER-1908] H3: upgrade to Spring 3
* pom.xml, .classpath
    update references to necessary spring-3.0.5 packages
* SeedModule
    merge rather than replace event listeners, so that (now later) autowiring doesn't clobber the self-insertion done by anonymous (non-top-level) SurtPrefixedDecideRule bean
* HeritrixLifecycleProcessor, PathScharingContext
    use this new non-default LifecycleProcessor to avoid new Spring3 behavior of auto-start()ing context on refresh(build)
* CrawlController
    example of using @Value annotation to set default value: will offer benefits for auto-discovery of defaults for configuration interface, or enforcing maximally-explicit configurations (see [HER-1897])
* profile-crawler-beans.cxml, selftest-crawler-beans.cxml
    update templates with spring3 preamble/boilerplate
2011-07-08 04:31:54 +00:00
gojomo aa15d293e8 [HER-1909] H3: slow checkpoint resume, locking out web UI during resume
[HER-1910] H3: job-related pages very slow to render (pause mid-way through) in large crawls
* BdbModule
    option to reuse bdb data on StoredQueue-creation
* Checkpoint
    new saveWriter, loadReader utilities for creating extra checkpoint files (for the long list of ready queues)
* BdbFrontier
    on checkpoint, remember ordered list of inProcess/ready/snoozed queues (so same queues are active upon resume)
    on resume, reuse old retired/inactive StoredQueue data, and reload active queues from newly-saved list
* StoredQueue
    restore tailIndex properly when resuing old data
    more-efficient size() calculation (for HER-1910)
2011-07-08 04:30:32 +00:00
gojomo 2b0d967b32 Resolve 'Browse Beans' issue after built, pre-launch
* JobRelatedResource
    catch InvalidPropertyException, render as red error message rather than fouling entire trace of beans to web UI
* StatisticsTracker
    rename getSnapshots to listSnapshots to prevent interpretation as (invalid) bean-property
2011-06-27 22:25:12 +00:00
nlevitt 041554fa5d Fix for HER-1906 checkpointing gives error on Windows
* HardLinker.java
    makeHardLink() - wrap unix link() and windows CreateHardLink() and choose depending on platform
* BdbModule.java
    doCheckpoint() - use HardLinker.makeHardLink()
2011-06-24 19:24:28 +00:00
gojomo 39091dc82c Fix tests
* TextSeedModule
    remove unintended @Required annotation
2011-06-22 23:09:43 +00:00
gojomo 842f495ee9 [HER-1905] H3: allow crawling to begin while large seed list still loading
* TextSeedModule
    refactor announceSeeds to occur in background thread if non-default blockAwaitingSeedLines value is set
    signal CountDownLatch on each line, allowing calling thread to proceed at right count
* profile-crawler-beans.cxml
    commented-out blockAwaitingSeedLines default settings (-1, meaning wait for all seed lines)
2011-06-22 21:21:26 +00:00
gojomo b9b64a6029 [HER-1776] H3: holding empty crawl for more URIs (other than 'paused')
* profile-crawler-beans.cxml
    replace obsolete pauseAtEmpty example property with replacement runWhileEmpty
2011-06-22 21:16:39 +00:00
gojomo 9d2b293d4c [HER-1904] H3: OOME after a few hours of previously non-problematic crawl
* Recorder
    use min(raw-buffer size, actual recorded byte size) for char buffer size
* TextUtils
    on recycleMatcher, dereference previous 'input'
2011-06-20 20:32:14 +00:00
nlevitt d3475fadbf * BdbMultipleWorkQueues.java
getFrom() - support null marker to start from first key, as appeared to be the intention
2011-06-20 18:06:41 +00:00
nlevitt d57b7751ae * SelfTestBase.java
verifyProgressStatistics() - expect "RUNNING" instead of "RESUMED" per r7180
2011-06-15 18:10:37 +00:00
gojomo 45a59d3a19 [HER-1776] H3: holding empty crawl for more URIs (other than 'paused')
* CrawlController
    change pauseAtFinish to runWhileEmpty
    add EMPTY state
    replace isStateRunning() with isActive() (RUNNING or EMPTY)
    trigger finish-test off frontier EMPTY rather than PAUSE
    in logging say 'running' rather than 'resumed' 
* Frontier
    add EMPTY state
* AbstractFrontier
    handle EMPTY like RUNNING, transition EMPTY<->RUNNING when appropriate
* StatisticsTracker
    handle EMPTY analogous to RUNNING
    in logging say 'running' rather than 'resumed' 
* CrawlJob, DiskSpaceMonitor
    replace isStateRunning() with isActive()
2011-06-15 06:01:49 +00:00
gojomo d9a53ff584 * JobRelatedResource
(writeNestedNames) use local getPropertyDescriptors(bwrap) to only show safely-displayable properties
2011-06-14 22:39:21 +00:00
gojomo 88416a150a Tangent revealed by [HER-1898] eritrix 3.1 misses many pages that Heritrix 3.0 catches
* Recorder
    use intended basis for GenericReplayCharSequence in-memory-prefix
* RecordingInputStream
    reveal internal ROS buffer size
2011-06-14 03:27:21 +00:00
nlevitt 78755dd304 HER-1898 - Heritrix 3.1 misses many pages that Heritrix 3.0 catches - reported by Dan Yadgar
* GenericReplayCharSequence.java
    decode() - read another character to check for more content, rather than consult BufferedReader.ready(), since the latter sometimes returns false even when there is more to read
2011-06-14 02:11:21 +00:00
gojomo 4ef6c5dc24 [HER-1899] scripting console comes back as XML in webkit browsers (Chrome, Safari)
* JobRelatedResource
    derive from BaseResource for webkit-XML-workaround
2011-06-13 23:31:36 +00:00
gojomo 19390f270a extra output to determine reason for slow test runs 2011-06-08 23:56:35 +00:00
gojomo 71ca9262df extra output to determine reason for slow test runs 2011-06-08 23:49:53 +00:00
gojomo c4636f38ec [HER-741] Make extractors interrogate for charset
* FetchHTTP
    use Charset-instances rather than String names
2011-06-04 00:25:23 +00:00
gojomo 2043d1801a [HER-741] Make extractors interrogate for charset
* ReplayCharSequence, GenericReplayCharSequence
    use Charset instance rather than String-name
* Recorder
    use Charset instance ratehr than String-name
    (getContentReplayCharSequence) avoid reusing cached ReplayCharSequence when encoding-in-use has changed since it was created
    (getContentReplayPrefixString) allow requested specific charset-interpretation
* ExtractorHTML, ExtractorXML
    work with Charset instances
    double-check that in-content-declarations are self-consistent before using
    recycle matcher instances
    change minor charset problems/decisions to a crawl.log annotation
2011-06-03 21:28:03 +00:00
gojomo 572aa83d39 * CrawlURI
make extraInfo declarations adjacent
    utility test for charset-declared-in-contentType
2011-06-03 21:17:32 +00:00
gojomo 4ea85ac817 * commons/pom.xml
bump test heap back to -Xmx1g
* BloomFilterTest
    restore 495MB-filter test
2011-05-31 22:28:39 +00:00
gojomo e791c23751 * BloomFilterTest
temporarily disable 495MB test until build box has more RAM
2011-05-28 01:10:33 +00:00
gojomo 292b30af1b remove unnecessary Serializable interface 2011-05-28 00:02:38 +00:00
gojomo 083e75e30a * CrawlServer.java
autoregister ConcurrentSkipListSet
2011-05-28 00:02:10 +00:00
nlevitt 164e6e2999 * commons/pom.xml
increase heap for surefire to size (640m) that seems to work on build box
2011-05-27 22:27:40 +00:00
gojomo 0cb6e96925 * commons/pom.xml
reduce heap for surefire in hopes of speeding build on memory-constrained build box
2011-05-27 05:17:27 +00:00
gojomo 99a49b2df7 Avoid treating temporarily-DEFERRED robots.txt handling as-if a failure-to-ignore in robots-ignored case
* DispositionProcessor
    treat S_DEFERRED different from other negative error statuses
2011-05-27 01:24:49 +00:00