Commit Graph
839 Commits
Author SHA1 Message Date
nlevitt da9eb5970c Fix bug preventing preload source from being loaded. 2009-11-12 00:15:31 +00:00
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 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 e3f3402213 * DefaultServerCache.java
remove superfluous synchronization
2009-11-10 01:37:04 +00:00
gojomo 9e0584b021 Followup for [HER-1703] convert all maps that operator might want to change on the fly to concurrent maps
* HTTPContentDigest.java
    avoid using null for overlayable KeyedProperty -- fix broken NPE in test
2009-11-07 20:10:19 +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 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 4a0f809c0d Post-beta-build
* **/pom.xml
    revert version name to SNAPSHOT
2009-10-07 11:54:12 +00:00
gojomo af9345a3be * **/pom.xml
rename version to 'beta' for distinguished 'beta' identified build (instead of SNAPSHOT/timestamp)
2009-10-07 11:25:20 +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 07adde3a73 Fix impoliteness regression
* CrawlURI.java
    return true calculated politeness delay, not 0!
2009-10-07 04:20:11 +00:00
gojomo eb659a9fad more profile cleanup
* profile-crawler-beans.cxml
   add alsoCheckVia
   improve description of commented-out defaults
   add CrawlLimitEnforcer
* SurtPrefixedDecideRule.java
    remove obsolete property
2009-10-07 01:05:59 +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 da95932598 * CrawlMetadata.java
set default RobotsHonoringPolicy, making explicit declaration unnecessary
 * RobotsHonoringPolicy.java
    apache license
2009-10-06 04:00:58 +00:00
gojomo 3654e330cc * (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:47:38 +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 6769cdb2dc Fix inadvertent build-breaking upward dependency from modules to engine
* modules//ProcessorChain.java
    send updates to ChainStatusReceiver interface
* engine//ToeThread.java
    implement ChainStatusReceiver interface
2009-10-06 01:01:32 +00:00
gojomo 13c9cc1915 [HER-1605] Refactor parameterizable policies out of frontier
* defaults.xml
    update bundled profile for new chains refactoring
* CrawlController.java
    move to three processor-chains rather than one
* Frontier.java
    (loadSeeds) removed
* ToeThread.java
    delegate most processing-loop to FetchChain and DispositionChain
* AbstractFrontier.java, WorkQueueFrontier.java
    move policies/calculation out to processors
* CandidatesProcessor.java
    new processor for DispositionChain that runs every outlink through CandidateChain
* CrawlStateUpdater.java -> DispositionProcessor.java
    rename, expand to prep CrawlURI for frontier
* FrontierScheduler.java
    deleted; use CandidatesProcessor/CandidateChain
* LinksScoper.java
    deprecated; use CandidatesProcessor/CandidateChain/CandidateScoper
    (only temporarily retained for ease of comparison)
* CandidateScoper.java
    simple single-URI scope-testing for CandidateChain
* FrontierPreparer.java
    precalculate all frontier-policies in CandidateChain, before scheduling
* PreconditionEnforcer.java
    ProcessorURI->CrawlURI; take on some prerequisite preparation previously deferred to elsewhere
* ProcessorsReport.java
    update for 3-chains of Processors
* SheetOverlaysManager.java
    (applyOverridesTo) moved here for broader use
* CandidateChain.java, FetchChain.java, DispositionChain.java
    role-specific subclasses of ProcessorChain (suitable for type-based autowiring)
* CrawlURI.java
    new fields/accessors of use to new chains/frontier
* PostProcessor.java
    deleted; skip-to-'postprocessing' is now skip-to-end-of-chain
* ProcessorChain.java
    take-on control loop formerly in ToeThread
* ProcessResult.java
    absorb ProcessStatus
    eliminate problematic STUCK result
2009-10-05 23:41:59 +00:00
gojomo 10275d7fa1 More ProcessorURI -> CrawlURI updates 2009-10-05 23:01:40 +00:00
gojomo 16538f175c Cleanup, refactoring
* (many)
   update license notice to Apache where appropriate
   eliminate ProcessorURI, DefaultProcessorURI in favor of CrawlURI (now in modules package)
   other comment/warning/unused code cleanup
2009-10-05 22:49:19 +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
szznax 677a816db4 Fix for [HER-1681] FetchFTP module doesn't set content-begin mark correctly.
Bug reported and fix suggested by Tomas Ukkonen.
* FetchFTP.java
    saveToRecorder(): call recorder.markContentBegin() after recorder.outputWrap()
2009-10-01 02:21:17 +00:00
szznax fef7a93bad As part of fix for [HER-1634] verify/port/update latest WARC
implementation in 1.14.3/heritrix2 to latest ISO document,
heritrix3 - in warcinfo record, "robots" field should be
"robots: classic" rather than "robots: CLASSIC"
* WARCWriterProcessor.java
  made robots entry in metadata lower-case
2009-09-30 17:06:53 +00:00
gojomo 99020c4981 [HER-1672] parallelQueues with overlays - prerequisites not landing in right queues (causes massive DNS-fetch repeats)
* PreconditionEnforcer.java, CrawlServer.java
    in testing found some ordering issues affecting robots-scheduling if parallelQueues>1
    reordered/refactored to put more responsibility in CrawlServer to resolve
2009-09-29 00:47:38 +00:00
szznax 1cfcf8e0a5 As part of fix for [HER-1634] verify/port/update latest WARC implementation in $
fold in H3 updates to http transaction constant for revisit records.
* CoreAttributeConstants.java
  removed A_HTTP_TRANSACTION, in favor checking CrawlURI method with isHttpTran$
* ModelAttributeConstants.java
  removed A_HTTP_TRANSACTION, in favor checking CrawlURI method with isHttpTran$
* FetchHistoryProcessor.java
  check for HTTP transaction using CrawlURI.isHttpTransaction()
  use HttpMethod in saveHeader() instead of HttpMethodBase
* WARCWriterProcessor.java
  check for HTTP transaction using CrawlURI.isHttpTransaction()
  use HttpMethod in saveHeader() instead of HttpMethodBase
2009-09-29 00:41:57 +00:00
gojomo c2b71a6f95 * WriterPoolProcessor.java
fix serialization test: make servercache field transient
2009-09-26 04:41:09 +00:00
gojomo 1c1a6501ba [HER-1672] parallelQueues with overlays - prerequisites not landing in right queues (causes massive DNS-fetch repeats)
* CrawlURI.java
    (getPolicyBasisUURI) return either own UURI, or -- for prereqs -- via UURI, as basis for overlays/policy calculations
* URIAuthorityBasedQueueAssignmentPolicy.java
    use getPolicyBasisUURI for queue-name decisions
* SheetOverlaysManager.java
    use getPolicyBasisUURI for surt-based overlay decisions
2009-09-26 04:18:25 +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 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 ee1c9e2ce4 [HER-1607] handle persist state when crawl starts up
* PersistProcessor.java
    add readOnly option for environment only opened for copying-from
* PersistLoadProcessor.java
    make start() safe to call redundantly (per Lifecycle contract)
2009-09-12 00:22:06 +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 a564b7a867 [HER-1675] FetchStats/CrawlSubstats not tallying fetchResponses correctly; as a result QuotaEnforcer doesn't work
* FetchStats.java
    increment fetchResponses appropriately
2009-09-09 00:12:54 +00:00
gojomo e03329a035 [HER-1668] support '-' SURT directives in seed files analogous to '+' (if a REJECTing SurtPrefixedDecideRule is present)
* SurtPrefixedDecideRule.java
    allow seeds to be null (as when rule is intentionally completely 
    independent of seeds; may also need to disqualify rule from
    Spring autowiring in such a case)
2009-09-02 23:24:30 +00:00
gojomo ad937c58e5 [HER-1662] use fully qualified hostname
* FetchHTTP.java
    replace one more InetAddress.getHostName() with InetAddress.getCanonicalHostName() (for consistency)
2009-08-28 06:56:20 +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 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 3292c8b7f6 Apache License, import cleanup 2009-08-27 01:34:11 +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 beb858369b Apache License 2009-08-27 01:27:28 +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 5c93d7bd28 Rename DecideResult.PASS to DecideResult.NONE for clarity
* DecideResult.java + references
    PASS was confusable with ACCEPT; NONE better conveys "no decision"
2009-08-14 21:31:11 +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 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 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 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 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 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