Commit Graph
48 Commits
Author SHA1 Message Date
gojomo f7af3e016b [HER-1655] Excessive charset/character-encoding exceptions; is fallback behavior correct?
* ReplayCharSequence.java, 
    return to ISO8859_1 as fallback-encoding
2009-08-27 00:20:37 +00:00
gojomo 783ecfd9d7 [HER-1655] Excessive charset/character-encoding exceptions; is fallback behavior correct?
* ReplayCharSequence.java, GenericReplayCharSequence.java, InMemoryReplayCharSequence.java
    refactor to put fallback-encoding in single place
2009-08-27 00:12:15 +00:00
gojomo c07a70eb21 Fix SubElement IllegalArgumentException (via WarcWriterProcessor.writeMetadata)
* SubElement.java
    accept zero-length strings as valid values
* WarcWriterProcessor.java
    don't write 'via' or 'hopsFromSeed' unless non-blank
2009-08-19 21:15:40 +00:00
gojomo a37a1846b7 Move getBufferedReader() -> IoUtils
* CrawlerJournal.java, IoUtils.java
    move getBufferedReader to IoUtils
* FrontierJournal.java
    add new 'included' tag for log lines ("Fi")
* (others)
    update for relocated method
2009-08-11 02:17:20 +00:00
gojomo 8b95e7fb36 CachedBdbMap cleanup - intended commit comment
* CachedBdbMap.java
    discard code to open/manage own BDB Environments (and related constructor) 
    cleanup comments/FIXMEs
* BdbModule.java
    return CachedBdbMap, rather than more general ConcurrentMap, in case requester wants it
* CachedBdbMapTest.java
    get instance via BdbModule (to manage env/classCatalog)
2009-08-11 02:10:28 +00:00
gojomo 8d09ee38ae CachedBdbMap cleanup 2009-08-11 02:07:22 +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 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 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 d8ed3822e7 compartmentalize IOExceptions
* RecordingInputStream.java
    restore expected nulling of closed 'in'
2009-07-28 22:01:50 +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 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 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
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 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 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 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 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 3862c361a4 Fixes from trial guide testing
* defaults.xml
    remove error-causing redundant BdbCookieStorage declaration
* TextUtils.java
    exception- and deprecation-free UTF8 URL escaping
* CrawlJob.java, JobResource.java
    ensure job log shows INFO-level items
    better handle job directories with spaces in them
2009-06-08 23:30:55 +00:00
gojomo 28ed31c498 [HER-1604] Springify/restletify: offer web interface to view/edit beans in running crawl
* BeanBrowseResource.java
    offers browsing (and limited editting of simple values) of beans in built crawl
* JobRelatedResource.java, ReportGenResource.java
    refactor for reuse by other job sub-resources
* JobResource.java
    link to job/beans and job/script
* DescriptorUpdater.java
    helper for marking-up PropertyDescriptors to aid UI bean access
* CrawlJob.java
    don't auto-instantiate context on request
* EngineApplication.java
    add uri routes
* FetchHTTP.java, BdbCookieStorage.java, LongWrapper.java WorkQueueFrontier.java, BdbUriUniqFilter.java
   improve display when browsed (esp. before launch)
2009-06-05 02:51:11 +00:00
gojomo 771d23240c refactor sheets to better enable mid-crawl changes
* Sheet.java
    make non-abstract; allow for name that might not be beanName
* SheetAssociation.java
    define targets as list of names, rather than Sheets themselves
* SheetForDecideRuled.java -> DecideRuledSheetAssociation.java; SheetForSurtPrefixes.java -> SurtPrefixesSheetAssociation.java
    make association separate from Sheet -- so same Sheet can be associated more than one place, more than one way
* SheetOverlaysManager.java
    match changes to Sheet and SheetAssociations
    offer convenience methods for post-construction addition of Sheets, associations
    use internal name-to-Sheet mapping, allowing for mid-crawl Sheet additions not in bean factory
* Precedence1SelfTest.java, Precedence4SelfTest.java
    update configs for Sheet changes
2009-06-05 02:12:32 +00:00
gojomo d336ea760f quiet excessive logging 2009-06-05 02:00:07 +00:00
gojomo 92f5ca2a45 remove unused imports/code 2009-06-05 01:12:51 +00:00
szznax b125b05deb minor improvement
* TestUtils.java
  added tmpDir() w/deleteOnExit() as a convenience method for
  classes not needing to implement TmpDirTestCase
2009-05-21 23:46:34 +00:00
szznax 3f6d60a054 copy to h3
Fix for [HER-1588] Arc2Warc transformed WARC has incorrect date in warcinfo record
* Arc2Warc.java
  correct WARC-Date format, and use Joda-time
2009-05-15 18:19:45 +00:00
gojomo a84e5b5dca copied to h3 from h2 commits
Misc: maintain object identity of peek()ed objects
* StoredQueueTest.java
    test that consecutive peek()s return exactly identical object
* StoredQueue.java
    cache head object object for peek consistency
2009-05-15 00:08:29 +00:00
gojomo a1e9d064da copy to h3
Fix for [HER-1520] Windows mapped-files cause intermittent ReplayCharSequenceTest.testReplayCharSequenceByteToStringMulti failures, risk other problems
* GenericReplayCharSequence.java
    use more diverse filenames, so subsequent decodes don't run into lingering open mapped sections of previous decodes
    do delete via new FileUtils.deleteSoonerOrLater utility
* FileUtils.java
   (deleteSoonerOrLater) try immediate delete, but if fails, add to a list of files to be retried later
2009-05-14 21:31:45 +00:00
gojomo 9155e5f4f9 copying noah's work to h3
Fix for [HER-1506] ByteReplayCharSequence ignores specified/non-default character encodings, reported by Jean-No?\195?\171l Rivasseau
* RecordingOutputStream.java
    use ByteReplayCharSequence only for iso8859-1
* ReplayCharSequenceTest.java
    new tests for iso8859-1, windows-1252 and ascii
2009-05-14 21:19:24 +00:00
gojomo ad33d302ff copying noah's work to h3
[HER-1506] correct javadoc on use of these classes
* GenericReplayCharSequence.java
* Latin1ByteReplayCharSequence.java
2009-05-14 21:12:34 +00:00
gojomo 5baac7cc45 copying noah's work to h3
[HER-1506] rename classes to reflect true roles
* MultiByteReplayCharSequence.java -> GenericReplayCharSequence.java
* ByteReplayCharSequence.java -> Latin1ByteReplayCharSequence.java
* RecordingOutputStream.java
    update references
2009-05-14 21:10:44 +00:00
gojomo 9994edb170 HER-565 / improve output if problem recurs 2009-05-14 20:29:01 +00:00
gojomo badbac399f apply to h3
Fix for [HER-1521] Make the UncompressedARCReader and CompressedARCReader in the ARCReaderFactory as public or protected
* ARCReaderFactory.java, WARCReaderFactory.java
    make compressed/uncompressed implementation inner classes public to enable direct reuse
2009-05-14 20:24:56 +00:00
gojomo 58486c5f18 (copying from h2 to h3)
Fix for [HER-1277] speculative javascript link caused 404s for "http%3A" and "www.example.com" like strings
* ExtractorJS.java
    perform additional decoding or prepending of "http:" for speculative candidate URIs that appear to need it
* ArchiveUtils.java
    add utility set/method with list of all TLDs
    
Fix for [HER-1524] speculativeFixup in ExtractorJS should maintain URL scheme
* ExtractorJS.java
    (speculativeFixup) maintain origin URI scheme if apparent target host is same
2009-05-13 02:14:15 +00:00
gojomo 2dec5dfd1a Fix for [HER-1268] ExtractorHTML not able to extract some links (due to them violating RFC2396)
* ExtractorHTMLTest.java, UURIFactoryTest.java
    test that relative-URIs with late-position colons aren't interpreted as absolute URIs with long, illegal schemes
* UURIFactory.java
    update RFC2396REGEX to require legal scheme
* LaxURI.java
    allow illegal candidate scheme to just be interpreted as something else
2009-05-12 22:22:11 +00:00
gojomo 2a73339211 Forward port for [HER-1525] Bump WARC version to match latest (0.18, June-2008) ISO draft
* WARCConstants.java, WARCWriter.java, WARCWriterProcessor.java
    remove/update references to pre-0.18 versions or old class names
2009-05-12 19:51:16 +00:00
gojomo fb97744dfd Fix for [HER-1495] ARCRecord throws null pointer when trying to generate a RecoverableIOException
* ARCRecord.java
    guard against bull statusBytes in exception message
2009-05-12 19:43:20 +00:00
gojomo 3f7d85d7aa Fix for [HER-1528] NumberFormatException in UURIFactory.checkPort()
* UURIFactoryTest.java
    test that port-looking-part that's out of integer bounds throws URIException not NumberFormatException
* UURIFactory.java
    catch NumberFormatException; allow to surface as URIException
2009-05-12 18:21:17 +00:00
gojomo e047bf68e0 copy 'springy' branch to heritrix3 2009-05-11 22:56:36 +00:00