Commit Graph
89 Commits
Author SHA1 Message Date
gojomo 91ffdac6d9 [HER-1561] update license to Apache License 2.0
* ScopePlusOneDecideRule.java
    removing, in favor of SurtPrefixedDecideRule's 'alsoCheckVia' option
* RecyclingFastBufferedOutputStream.java
    use library by deriving as subclass (rather than c&p), now that class is available in an included library (fastutil)
2009-11-11 01:40:43 +00:00
gojomo ce79e8a76e [HER-1561] update license to Apache License 2.0
* SeekReader.java
   update to Apache
* RecoveryLogMapper.java
   revert to LGPL pending verification of authors' approval for relicensing
2009-11-11 00:28:03 +00:00
gojomo dd0ca367c3 [HER-1706] PersistLoadProcessor and PersistStoreProcessor can't share same BdbModule
* BdbModule.java
    allow Database instance reuse if BdbConfig is identical instance
* PersistProcessor.java
    convert shared BdbConfig for history db to static constant HISTORY_DB_CONFIG
* PersistOnlineProcessor.java
    use HISTORY_DB_CONFIG, don't close possibly-shared DB on stop()
* PrecedenceLoader.java, PreloadedUriPrecedencePolicy.java
    use HISTORY_DB_CONFIG
2009-11-10 23:48:10 +00:00
gojomo 0497efbb32 [HER-1561] update license to Apache License 2.0
* (many)
    update license boilerplate
* (few)
    delete no-longer used classes
2009-11-10 21:03:27 +00:00
gojomo c2c0e5116e [HER-1705] 'harmless' low-memory-canary causing heap reference leak/OOME
* CachedBdbMap.java, ObjectIdentityBdbCache.java
    only reinstall canary if map/cache still has 'db' field
2009-11-09 03:55:12 +00:00
gojomo 11048de24c [HER-1703] convert all maps that operator might want to change on the fly to concurrent maps
* KeyedProperties.java
    derive from ConcurrentHashMap
* Sheet.java
    ensure internal map is always a concurrent-map (even when setMap is passed something else)
* SheetOverlaysManager.java
    convert ruleAssociations, sheetNamesBySurt, sheetsByName to concurrent implementation classes
* ScriptedProcessor.java, ScriptedDecideRule.java
    convert sharedMap to concurrent implementation
* DecideRuledSheetAssociation.java
    ensure non-equal associations don't compareTo()==0 (implying equals, causing problems in sorted maps/sets)
2009-11-07 03:07:51 +00:00
gojomo 648ef7deef Fix issues with surt-source, surt-dump file paths
* ConfigPathConfigurer, PathFixupListener
    notify beans when paths fixed
* SurtPrefixedDecideRule.java
    only read source prefixes after path fixup; dump after read or any batch of seeds
* SeedModule.java, TextSeedModule.java, SeedListener.java
    new concludedSeedBatch event 
* AbstractFrontier.java, StatisticsTracker.java
    ignore new concluded-batch event
* AlertThreadGroup.java, JobResource.java
    new mechanism for threads not part of AlertThreadGroup to temporarily redirect their logging to provided (job) logger
2009-10-26 11:29:58 +00:00
gojomo 59003e22ab Fix issues with surt-source, surt-dump file paths
* ConfigPathConfigurer, PathFixupListener
    notify beans when paths fixed
* SurtPrefixedDecideRule.java
    only read source prefixes after path fixup; dump after read or any batch of seeds
* SeedModule.java, TextSeedModule.java, SeedListener.java
    new concludedSeedBatch event 
* AbstractFrontier.java, StatisticsTracker.java
    ignore new concluded-batch event
* AlertThreadGroup.java, JobResource.java
    new mechanism for threads not part of AlertThreadGroup to temporarily redirect their logging to provided (job) logger
2009-10-26 11:27:09 +00:00
gojomo 2e31d58687 * ObjectIdentityBdbCache.java
replace costly bdb size() operation with maintained counter
2009-10-23 22:33:36 +00:00
gojomo 06223b2794 BDB JE tuning
* BdbModule.java
    increase je.log.faultReadSize from 2K to 6K -- stats showed many faults (ideal is zero)
2009-10-23 21:55:06 +00:00
gojomo 45f09818ae Fix intermittent ClassCastExceptions on job console
* Histotable.java, ToePool.java
    only tally Strings; convert all histotable keys to strings for sorting
2009-10-07 10:18:21 +00:00
gojomo b7631e2b02 Misc fixes from H1-to-H3 testing
* BdbModule.java
    be more robust about 0/-1 as 'don't care' values
* AbstractFrontier.java
    reorder settable properties for ease of discovery
* FetchHTTP.java
    correct type to allow setting property
2009-10-07 04:22:05 +00:00
gojomo 258da53d57 [HER-1676] improve bundled profiles to match best-practice, be self-documenting
* profile-crawler-beans.cxml
    add comments for all unstated default values an operator might want to change
* (many) 
    reorder, refactor, rename to better minimize/match simple configuration
2009-10-06 19:35:05 +00:00
gojomo 2d3f569f15 * InterruptibleCharSequenceTest.java
better output to diagnose intermittent failure
2009-10-06 03:58:22 +00:00
gojomo d86f5f7403 * (many)
harmonize our usage on '[Rr]egex' as the abbrieviation for regular-expression
    (replacing RegExp/etc.; 'regex' is 30-40% more prevalent by google hits)
2009-10-06 03:45:44 +00:00
gojomo c7ed3e775d Misc
* ArchiveUtils.java
   (checkContinue) utility method relocated from ToeThread for converting interrupt status to exception
* ClassKeyMatchesRegExpDecideRule.java
   properly set up crawlController property for auto-wiring
2009-10-05 22:59:46 +00:00
szznax ba5bc1a20c Fix unit tests (carried over from H1)
* WARCWriterTest.java
    (testSpaceInUrl),(testTabInURL): don't expect exception; expect nothing-written
2009-10-05 18:35:06 +00:00
gojomo 86974e2e1d Cleanup post-fix
* ObjectIdentityBdbCache.java
    with late ref-enqueuing confirmed as cause of problems, cleaning out unnecessary steps, improving comments
2009-10-04 06:15:35 +00:00
gojomo 75676ac905 Attempt at fixing build-box-only warnings
* ObjectIdentityBdbCache.java
    explicitly page-out lingering entry; 
    temporary System.err logging to see if problem is momentary lag in RefQueue-appearance
2009-10-04 05:14:59 +00:00
gojomo c05044d51b Eliminate double-database close log messages
* BdbModule.java
   split openDatabase() to openManagedDatabase() (auto-closed) and plain openDatabase() (caller-closes)
   set TempStoredSortedMap to use unmanaged openDatabase
* (others)
   use openManagedDatabase()
2009-10-04 05:06:14 +00:00
gojomo c3914ea943 Attempt at fixing build-box-only warnings
* ObjectIdentityBdbCache.java
    add earlier check/better logging for error state
2009-10-04 03:31:45 +00:00
gojomo 839e895a8d Attempt at fixing build-box-only warnings
* ObjectIdentityBdbCache.java
    synchronize critical sections on memMap, diskMap rather than enclosing object
2009-10-03 23:55:59 +00:00
gojomo 3cb6b59b8c [HER-769] Support case where millions of seeds.
* BdbModule.java
    add temp-stored-map service method
    remove unused secondary-db support
* TempStoredSortedMap.java
    StoredSortedMap that can destroy its underlying database after temporary use
* StatisticsTracker.java
    update various sorted-by-decreasing-frequency methods to use temp StoredMaps, with duplicate keys that are negative counts
* (Multiple)Report.java
    update to use new duplicate-keyed frequency maps
2009-10-03 23:28:11 +00:00
szznax 97778493e2 As part of fix for [HER-1671] WARCWriterProcessor error when writing
problematic (illegal control character?) outlink
catch IllegalArgumentException in ANVLRecord.addLabelValue() to allow
WARCWriter to continue processing, and move
WARCWriter.createRecordHeader() into its own try-catch block to with
logging prevent fouling record when problems occur creating header.
* ANVLRecord.java
    catch IllegalArgumentException in addLabelValue and log warning to
    give WARCWriter to continue processing
* WARCWriter.java
    move createRecordHeader() into its own try-catch block to log
    severe problem writing record without fouling the WARC, and have
    baseCharacterCheck() throw IllegalArgumentException in accord with
    ANVLRecord.addLabelValue
* WARCWriterTest.java
    throw IllegalArgumentException in accord with
    WARCWriter.createRecordHeader()
2009-10-03 00:41:59 +00:00
szznax 03df2a9a99 As part of fix for [HER-1671] WARCWriterProcessor error when writing problematic (illegal control character?) outlink - percent encode control-characters in 'userinfo' part of URI as we do for uriPath and uriQuery, so we don't raise exception when adding outlinks to metadata record
* UURIFactory.java
  ensureMinimalEscaping() on 'userinfo' in UURIFactory.fixupAuthority()
2009-10-02 01:39:44 +00:00
szznax 3e65e09927 As part of fix for [HER-1634] verify/port/update latest WARC
implementation in 1.14.3/heritrix2 to latest ISO document,
heritrix3 - update REVISIT profile URIs per WARC spec (May 2009)
* WARCConstants.java
  PROFILE_REVISIT_IDENTICAL_DIGEST =
    "http://netpreserve.org/warc/1.0/revisit/identical-payload-digest"
  PROFILE_REVISIT_NOT_MODIFIED =
    "http://netpreserve.org/warc/1.0/revisit/server-not-modified"
2009-09-29 21:52:33 +00:00
gojomo 1951930842 Improve test robustness in face of unpredictable GC
* ObjectIdentityBdbCache.java
   (pageOutStaleEntries) package-protection for unit-test visibility
* ObjectIdentityBdbCacheTest.java
   explicit pageOutStaleEntries, better assert-fail message
2009-09-29 20:20:14 +00:00
gojomo 5a0fe30366 Quiet JUnite test issues
* BdbModuleTest.java, CachedBdbMapTest.java
    use putIfAbsent() in preference to put() (which logs warning)
* BdbModule.java
    register big-cache DBs in implementation-specific methods, so always auto-closed on env close
2009-09-29 19:22:23 +00:00
gojomo 7bd6017448 * ObjectIdentityBdbCache.java
avoid error if size() called after close()
2009-09-26 04:12:23 +00:00
gojomo a285a65576 * CachedBdbMap.java
remove superfluous (build-breaking) imports
2009-09-25 22:50:43 +00:00
gojomo 7521375128 [HER-1677] threads stuck in CachedBdbMap.get/_getMem
alternate simplified implementation of our object-cache need
* ObjectIdentityCache.java
    new interface, far less than (Concurrent)Map, for big seems-like-in-memory object-cache
* Supplier.java
    trivial interface for deferred-provision of new instance
* CachedBdbMap.java
    implement ObjectIdentityCache, mainly via getOrUse()
* ObjectIdentityMemCache.java
    trivial ConcurrentHashMap-based all-in-memory ObjectIdentityCache implementation
* ObjectIdentityBdbCache.java
    BDB-backed ObjectIdentityCache implementation, carved from CachedBdbMap
* BdbModule.java
    refactor utility methods to offer CachedBdbMap or ObjectIdentityBdbCache instances, via source toggle
* EnhancedEnvironment.java
    convenience test-environment method
* (others)
    update to use ObjectIdentityCache/ObjectIdentityMemCache in place of ConcurrentMap/ConcurrentHashMap
2009-09-25 21:18:14 +00:00
gojomo e7ab73dd5d [HER-1677] threads stuck in CachedBdbMap.get/_getMem
alternate simplified implementation of our object-cache need
* ObjectIdentityCache.java
    new interface, far less than (Concurrent)Map, for big seems-like-in-memory object-cache
* Supplier.java
    trivial interface for deferred-provision of new instance
* CachedBdbMap.java
    implement ObjectIdentityCache, mainly via getOrUse()
* ObjectIdentityMemCache.java
    trivial ConcurrentHashMap-based all-in-memory ObjectIdentityCache implementation
* ObjectIdentityBdbCache.java
    BDB-backed ObjectIdentityCache implementation, carved from CachedBdbMap
* BdbModule.java
    refactor utility methods to offer CachedBdbMap or ObjectIdentityBdbCache instances, via source toggle
* EnhancedEnvironment.java
    convenience test-environment method
* (others)
    update to use ObjectIdentityCache/ObjectIdentityMemCache in place of ConcurrentMap/ConcurrentHashMap
2009-09-25 21:16:53 +00:00
szznax 78dd7f2086 Fix for [HER-1648] harmonize declared WARC versions in protocol, warcinfo record metadata
WARConstants.java
  update WARC_VERSION=1.0 according to ISO 28500:2009 as of May 2009
WARCWriterProcessor.java
  update format and conformsTo fields according to ISO 28500:2009,
  as of May 2009, as described at http://bibnum.bnf.fr/WARC/,
  latest draft as of November 2008
  format: WARC File Format 1.0
  conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf
2009-09-23 18:42:25 +00:00
gojomo 2bd9334627 [HER-1677] threads stuck in CachedBdbMap.get/_getMem
* CachedBdbMap.java
    make all WARNING logs include stacks
    add WARNINGs if memMap.remove() has no expected effect
    verify reported expunction, WARN and try to fix if memMap expunction not evident
    adjust indentation/bracketing
2009-09-22 21:16:21 +00:00
gojomo 142c72fc04 [HER-1668] support '-' SURT directives in seed files analogous to '+' (if a REJECTing SurtPrefixedDecideRule is present)
* SurtPrefixedDecideRule.java
    pass only portion after directive ('+' or '-') to SurtPrefixSet
* SurtPrefixSet.java
    better comment/param name
2009-09-16 01:05:23 +00:00
gojomo 163dcb7826 [HER-1607] handle persist state when crawl starts up
* BdbModule.java
    fail-fast if not started properly; stop with fewer errors in problem situations
* CrawlController.java
    continue past runtimeException on stop
* CrawlJob.java
    less redundant error-reporting
* AbstractFrontier.java
    consider PAUSE or FINISH valid targets after unexpected exception 
* StatisticsTracker.java
    avoid promoting runtimeException in report-generating up
* PersistOnlineProcessor.java
    delegate DB-closing to BdbModule to avoid double-close
2009-09-11 02:26:04 +00:00
gojomo 0b10862c8d Make during-crawl sheets/overlay changes easier
* SheetOverlaysManager.java
    convenience methods for during-crawl changes:
    (getOrCreateSheet)
    (deleteSheet)
    (putSheetOverlay)
    (removeSheetOverlay)
* Sheet.java
    improved comments
2009-09-03 06:33:25 +00:00
gojomo d253ff1ace [HER-1662] use fully qualified hostname
* WriterPoolProcessor.java, ARCWriterProcessor.java, WARCWriterProcessor.java, InetAddressUtil.java 
    replace all InetAddress.getHostName() with InetAddress.getCanonicalHostName() (for consistency)
2009-08-27 23:35:07 +00:00
gojomo 8ba6d47a93 Apache License 2009-08-27 23:10:38 +00:00
gojomo dc89ce0d95 [HER-1668] support '-' SURT directives in seed files analogous to '+' (if a REJECTing SurtPrefixedDecideRule is present)
* SurtPrefixSet.java
    refactor to allow add-directives under outside control
* SurtPrefixedDecideRule.java
    extend nonseedLine() mechanism to trigger off '+' or '-' depending on decision being ACCEPT or REJECT
2009-08-27 01:40:26 +00:00
gojomo 608a3ddc8b [HER-1607] handle persist state when crawl starts up
* PersistProcessor.java, PersistLoadProcessor.java
    port [HER-1586] preloadSource setting/refactoring to H3
* IoUtils.java
    (getBufferedReader) utility method
* BdbModule.java
    explicit passthrough of settable deferredWrite property
2009-08-27 01:32:08 +00:00
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