Commit Graph
116 Commits
Author SHA1 Message Date
gojomo 8d09ee38ae CachedBdbMap cleanup 2009-08-11 02:07:22 +00:00
gojomo 023efe4aba [HER-1660] allow adding seeds, recovery-journal-like URI data at any point in crawl via 'action directory'
* ActionDirectory.java
    initial implementation; handle '.seeds' files
2009-08-06 21:33:31 +00:00
gojomo 0400d81ee5 support for...
[HER-1660] allow adding seeds, recovery-journal-like URI data at any point in crawl via 'action directory' 
[HER-769] Support case where millions of seeds. 
* AbstractFrontier.java
    move sourceTagSeeds setting to SeedModule
    trigger and schedule seeds via SeedModule's announcements and SeedListener protocols
* StatisticsTracker.java
    implement SeedListener, use processedSeedRecords as list of all seeds
* ProcessorURI.java, DefaultProcessorURI.java
    (getURI) convenience accessor for plain URI string
* SurtPrefixedDecideRule.java
    use seeds as prefixes via SeedListener notifications, rather than separate scan of seeds source text
* SeedListener.java
    simplify to notifications of new seed, and nonseed text mixed with seeds (as with SURT directives)
* SeedModule.java
    methods for SeedListener interface, announceSeeds, actOn(File)
* TextSeedModule.java
    eliminate interators; add methods for announcing seeds and scanning seed text sources (including arbitrary Files)
* PrefixSet.java, SurtPrefixSet.java
    derive from ConcurrentSkipListSet; eliminate now-unneeded extra synchronization and clone()s 
    offer considerAsDirective() for direct application of directive Strings
2009-08-06 21:24:04 +00:00
gojomo 4d06b239ee Push CrawlURI and related constants down to modules subproject/package
(many)
2009-08-06 20:22:00 +00:00
gojomo 0ebac2f115 * CachedBdbMapTest.java
more timing/heap voodoo for test robustness
2009-08-06 20:11:04 +00:00
gojomo 64d3fd212f [HER-1659] make default WARC size comply with spec; adjust default pool size for fewer odd-sized (W)ARCs
* ArchiveFileConstants.java
    remove superfluous constant
* WriterPool.java
    DEFAULT_MAX_ACTIVE -> 1
* WriterPoolMember.java
    update constant use; remove deprecated+unused methods
* WriterPoolProcessor.java
    pull storePaths up from subclasses, but set default via subclass method
    set defaultMaxSize via subclass method
* WARCWriterProcessor.java, ARCWriterProcessor.java
   (getDefaultMaxFileSize), (getDefaultStorePaths) as appropriate
2009-08-06 00:55:27 +00:00
gojomo 272ae19961 Cleanup
* CachedBdbMap.java
    remove debug output
* TestUtils.java
    add info logging
* CachedBdbMapTest.java
    make more robust against prior heap usage, different platforms
2009-08-04 06:55:31 +00:00
gojomo 4f0961c371 Fix NPE
* URIAuthorityBasedQueueAssignmentPolicy.java
    tolerate null getRawPathQuery response
2009-08-04 01:31:38 +00:00
gojomo c196a1de77 [HER-1658] CachedBdbMaps not expunging as expected (especially StatisticsTracker.processedSeedsRecords)
* CachedBdbMap.java
    do expunge on put(), replace()
    add low-memory-sensitive 'canary' to force expunge even if otherwise untriggered
* CachedBdbMapTest.java
    add test of idle expunge in low-memory conditions
* CrawlURI.java
    (getURI) direct access to String URI (don't reuse toString() functionally)
* SeedRecord.java
    support for updating record with later/repeat report
* StatisticsTracker.java
    remove put()s for processedSeedRecords, hostsLastFinished
* BdbFrontier.java
    (getQueueFor) remove put, do in concurrent-compliant manner
2009-08-04 00:06:22 +00:00
gojomo 1c984753f0 Work for [HER-1656] add multiple-queues-per-host ('parallelQueues') capabilities to QueueAssignmentPolicies
* LongToIntConsistentHash.java + Test
    expand range/distribution tests
    correct problems with phony '-1' bucket being created/returned
2009-07-31 22:55:09 +00:00
gojomo 5bb8596fab Work for [HER-1656] add multiple-queues-per-host ('parallelQueues') capabilities to QueueAssignmentPolicies
* LongToIntConsistentHash.java + Test
    consistent-hashing utility class
* URIAuthorityBasedQueueAssignmentPolicy.java
    shared superclass for the hostname and surtauthority QAPs
    setting for 'deferToPrevious' -- avoid changing assignments
    setting for 'parallelQueues' -- when > 1, consistent-hash URIs across that many separate queues (with numerical suffix)
* SurtAuthorityQueueAssignmentPolicy.java, HostnameQueueAssignmentPolicy.java
    refactor to derive from URIAuthorityBasedQueueAssignmentPolicy
* QueueAssignmentPolicy.java
    add Apache license
* Hop.java
    add String representation for convenience
2009-07-28 23:02:11 +00:00
gojomo d2a82228a3 TODO/FIXME comments where things don't seem quite right but aren't definitively buggy
* CachedBdbMap.java
    reevaluate if clear() should include close()
* CrawlURI.java
    investigate possible confusion in meaning of isPrerequisite()
2009-07-28 22:56:54 +00:00
gojomo 5027fb9aa0 * AbstractFrontier.java, WrokQueueFrontier.java
remove outdated comments; use isEmpty()
2009-07-28 22:47:01 +00:00
gojomo 478e425b34 Work for [HER-1655] Excessive charset/character-encoding exceptions; is fallback behavior correct?
* FetchHTTP.java
    really disable the WARNING logging, now
2009-07-28 22:46:04 +00:00
gojomo d8ed3822e7 compartmentalize IOExceptions
* RecordingInputStream.java
    restore expected nulling of closed 'in'
2009-07-28 22:01:50 +00:00
gojomo 597c910422 Work for [HER-1655] Excessive charset/character-encoding exceptions; is fallback behavior correct?
* FetchHTTP.java
    catch charset problems early and add as crawl.log annotation, fallback to default without raising log/alert/WARNING-level notice
2009-07-28 01:01:09 +00:00
gojomo a2940bc23e compartmentalize IOExceptions
* RecordingInputStream.java
    make sure one exception (intermittently seen on Windows re: 'mapped section') doesn't leave things in foul state for next try in same thread
2009-07-28 00:54:06 +00:00
gojomo 4cd9eb2e41 Work for [HER-1654] suspicious Cookie bottlenecks: synchronization, growth
* Cookie.java
    simple non-contending String compare (fixed similarly upstream in HttpClient;
    see https://cwiki.apache.org/jira/browse/HTTPCLIENT-645 )
2009-07-28 00:48:36 +00:00
gojomo 917dfc2bd3 Fix ConfigPath inconsistencies in reporting, relative paths, fixup-ordering
* ConfigPathConfigurer.java
    work in two passes: one (BeanPostProcessor) collects all candidates for fixup, two (ApplicationListener) actually performs fixup
    suppress fixup of own base path, preventing circulare ref/StackOverflow
* ConfigPath.java
    change sense of 'merge' to merge into receiver
* SurtPrefixedDecideRule.java
    use ConfigFile, use 'merge' in assignment
* CrawlerLoggerModule.java
    use merge in assignment
* CrawlJob.java
    (getBeanpathTarget) utility method
* JobResource.java
    respect unset ConfigPaths
* ConfigPathEdito.java, ConfigFileEditor.java
    better comments, ConfigFile variant
2009-07-24 20:22:06 +00:00
gojomo 60ebd6cfdb * CrawlController.java
better handle case where crawl is discarded before launched
2009-07-24 00:27:57 +00:00
gojomo c3cc7cc7e5 * JobResource.java
complete rename of printLinked to printLinkedFile
2009-07-24 00:27:27 +00:00
gojomo 0b577387af improve display of known ConfigPaths
* ConfigPathConfigurer.java
    key by propPath
* JobResource.java
    display by "propPath: assigned name"
* WriterPoolProcessor.java
    fix typo
2009-07-24 00:06:34 +00:00
gojomo 3d573a8d5f Resolve remaining broken links to logs outside job dir
* JobResource.java
    refactor, improve printLinkedFile
* EngineApplication.java
    remove debug output
2009-07-24 00:00:28 +00:00
gojomo ace6d95ab8 Fix race conditions/unclean shutdown around 'teardown' (esp. if crawl running)
* CrawlController.java
   (isFinished) added
* CrawlJob.java 
   rename reset to teardown
   wait for CrawlController to report finished before discarding AppContext
   if not finished in time, fail reporting 'false'
* JobResource.java
   show Flash if teardown did not succeed; user must retry
* BdbUriUniqFilter.java
   don't throw DatabaseException from simple accessor
2009-07-23 22:49:42 +00:00
gojomo ef0a9f89d4 Fix risk of destruction/confusion from WriteTarget#getWriter
* WriteTarget.java, ReadSource.java
    renamed Writer/Reader accessors to avoid bean-style 'get-' naming
    improve comments
* ConfigFile.java, ConfigString.java, ScriptedProcessor.java, ScriptedDecideRule.java, SurtPrefixedDecideRule.java, TextSeedModule.java
    reflect above change
2009-07-23 20:30:48 +00:00
gojomo e0d748cd3b improve comment 2009-07-23 20:28:29 +00:00
gojomo 52a0895c6b * JobResource.java
rename 'discard' to 'teardown'
    enable browse/edit of paths outside jobdir via new /anypath/ service
* EngineResource.java, Engine.java
    enable addition of job dirs from outside main jobs directory
* EngineApplication.java
    register new /engine/anypath service for outside-job-dir paths
2009-07-22 15:59:30 +00:00
gojomo 4d7c4834d8 * ScriptResource.java
offer better ack of lines-executed (even if they generate no output)
2009-07-22 15:53:49 +00:00
gojomo 1fc2880106 * SurtPrefixedDecideRule.java
make surt-config files ConfigPaths, so they can be job-relative
2009-07-22 15:51:58 +00:00
gojomo 1cea6dc412 * TextSeedModule.java
(addSeed) synchronize, just in case a thread contention is causing problems
2009-07-22 15:49:59 +00:00
gojomo d6496b993a * SheetOverlaysManager.java
make empty map modifiable, to ease during-crawl additions
    add accessors for other fields, to ease browsing
2009-07-20 20:09:08 +00:00
gojomo e1563a7239 (W)ARCs not being written compressed by default
* WriterPoolProcessor
    set 'compress' field default to true
2009-07-20 17:15:41 +00:00
szznax e8a8639277 initial checkin: this class is useful for determining why ArchiveReader fails for problematic W/ARC files 2009-07-17 21:52:21 +00:00
szznax 9fe716cf8f copy to h3
Fix for [HER-1568] ARCReader fails on some newer Alexa ARC files
* ARCConstants.java
  added ArcRecordErrors enum for known reading errors
* ARCReaderFactory.java
  only check for 'LX' extension in GZIP extra field
* ARCRecord.java
  added errors, hasErrors(), and getErrors()
2009-07-17 21:51:24 +00:00
gojomo f82432ca9d Improve conciseness/clarity of ReplayInputStream/ReplayCharSequence usage/cleanup
* ReplayCharSequence.java
    implement Closeable
* ArchiveUtils.java
    (closeQuietly) for ReplayCharSequence 
* ExtractorCSS.java, ExtractorDOC.java, ExtractorHTML.java, ExtractorJS.java, ExtractorXML.java, HTTPContentDigest.java, CrawlServer.java, MirrorWriterProcessor.java, WARCWriterProcessor.java
    cover more with finally blocks; use closeQuietly() variants
2009-07-15 23:30:22 +00:00
gojomo 20a1b19a6a * ScriptedProcessor.java
add intended ApplicationContextAware interface
2009-07-15 23:24:13 +00:00
gojomo 9ed41e9ea2 Remedy potential filehandle leak
* RecordingOutputStream.java
    close ReplayInputStream used to create GenericReplayCharSequence
    use 'UTF-8' and not possibly-varying JVm default encoding when none specified
2009-07-15 23:23:06 +00:00
gojomo c01032a56f Excessive exceptions for unsupported/illegal encodings
* GenericReplayCharSequence.java, InMemoryReplayCharSequence.java
    catch, log, fallback to UTF-8 for problematic encoding names
2009-07-15 23:20:36 +00:00
gojomo 427b633826 Large seed list = web UI launch spins for hours without returning
* CrawlJob.java
    move the requestCrawlStart into the background/crawl-group thread
2009-07-14 23:56:53 +00:00
gojomo fd072ffaaa Absolute paths not respected
* WriterPoolProcessor.java
    treat paths beginning '/' as absolute
* ARCWriterProcessor.java
    remove vestigial default-path var/method
2009-07-14 23:41:00 +00:00
gojomo c721d34fde [HER-1642] fix HOWTO-launch document
* HOWTO-Launch-Heritrix.txt
    removed; info mostly about H2 variants
* README.txt
    updated wiki link, launch info to match H3
* LICENSE.txt
    updated to Apache2
2009-07-13 23:06:23 +00:00
gojomo 8e5b46250e Fix undesired relativization of intended-absolute paths
* ConfigPath.java
    special check for path starting '/'; if so, ignore 'base'
2009-07-09 22:46:26 +00:00
gojomo 4251e5311f * SelfTestBase.java
report full path of unclosed ARC for manual checking -- truly unclosed or timing issue?
2009-07-08 01:21:49 +00:00
gojomo dd254088e1 [HER-1633] port IsCrossTopmostAssignedSurtHopDecideRule to heritrix3
* HopCrossesAssignmentLevelDomainDecideRule.java
    port H2 IsCrossTopmostAssignedSurtHopDecideRule to H3 under this new name
* PublicSuffixes.java
    update comment, public method for 'Assignment Level Domain'/'Assignment Level SURT' term
* AssignmentLevelSurtQueueAssignmentPolicy
    renamed TopmostAssignedSurtQueueAssignmentPolicy
2009-07-08 00:28:56 +00:00
gojomo cb8a374e5d [HER-1636] H3: Failed get of replay char sequence due the OutOfMemoryError: Map failed (port HER-1482)
(from nlevitt's H2 commit message:)
* InMemoryReplayCharSequence.java
    new, simple ReplayCharSequence that supports any encoding, keeping everything in memory
* GenericReplayCharSequence.java
    If the encoding supports random access, memory maps the backing file directly; otherwise decodes to UTF-16 and maps that. Supports the first Integer.MAX_VALUE bytes of the file. Maps up to 64M; moves the map around as necessary for larger files.
* Latin1ByteReplayCharSequence.java
    removed, functionality split between InMemoryReplayCharSequence and GenericReplayCharSequence
* ReplayCharSequenceTest.java
    xestHugeReplayCharSequence() - uncomment to test a huge replay char sequence
    testReplayCharSequenceByteToStringOverflow() - test both UTF-8 and windows-1252
* RecordingOutputStream.java
    use the new ReplayCharSequences
2009-07-07 21:53:57 +00:00
gojomo 1128ad638b [HER-1609] wide crawl performance is limited by lock contention in ServerCache.getServerFor(String)
* CachedBdbMap.java
    remove unnecessary import of CrawlController (from engine subproject)
2009-07-07 01:35:56 +00:00
gojomo 89a55c7fdd * JobResource.java
make UI more robust against browser/platform font size variances
2009-07-06 23:37:30 +00:00
gojomo 149fc414df [HER-1609] wide crawl performance is limited by lock contention in ServerCache.getServerFor(String)
* (all, especially CachedBdbMap.java) 
    pbaclace-contributed patch, ported to H3, plus...
* StatisticsTracker.java
    replace LongWrapper with AtomicLong
    use non-recursive putIfAbsent-based idiom for get-or-create
* DefaultServerCache.java
    clean up host/server get-or-create around non-recursive concurrent idiom
* BdbModule.java
    add expectedConcurrency property & je.lock.nLockTables tuning
* TopNSet.java
    add synchronization, as calling StatisticsTracker method has lost it
2009-07-06 23:36:17 +00:00
gojomo 4583ff7306 Rename Rrc2617Credential to HttpAuthenticationCredential
* (multiple)
    use more-familiar name for HTTP authentication
2009-07-06 22:09:52 +00:00
gojomo 56b31490c8 [HER-1574] meta refresh urls not html unescaped
* ExtractorHTML.java
    apply same 1-line fix as H1/H2
2009-06-11 23:06:07 +00:00