Commit Graph

149 Commits

Author SHA1 Message Date
gojomo 1ce23ecbcd [HER-747] Ensure 'retired' status for queues is operator-controllable
[HER-1768] Changing queue totalBudget not retiring queue as expected
* CrawlURI.java
    (includesRetireDirective) internalize to CrawlURI
* AbstractFrontier.java
    allow re-enqueuing of untried URI with retire-driective
    clean up terminology/method-names
* WorkQueue.java, WorkQueueFrontier.java, BdbFrontier.java
    adjust budget/sessionBalance handling to always count up, always consult latest values, always refresh values from latest URI
    (processFinish) reorganize to reduce redundancy
* DispositionProcessor.java
    offer forceRetire setting
* QuotaEnforcer.java
    set failed-status *or* forceRetire, not both
[HER-1823] H3: adding SheetAssociations mid-crawl won't affect already queued CrawlURIs (sheet liveness) 
* SheetsOverlayManager.java
    (applyOverlaysTo) rename, unify, reapply whenever called to ensure liveness
* CandidatesProcessor.java
    adjust to rename
2010-09-21 10:55:07 +00:00
gojomo 153e709fe5 * WriterPoolProcessor.java
eliminate nonsensical type check
2010-09-15 03:52:11 +00:00
gojomo d6a4d158b0 [HER-1803] H3: make it easier to change robots settings
* RobotsPolicy.java
    simplified unification of RobotsHonoring and RobotsExclusion policy classes; subclasses specialize
* ObeyRobotsPolicy.java
    classic obey-robots-as-declared policy
* IgnoreRobotsPolicy.java
    ignore declared robots policy
* CustomRobotsPolicy.java
    follow custom-crafted policy in robots.txt format
* MostFavoredRobotsPolicy.java
    follow the most-permissive policy available to a set of user-agents; optionally adopt ('masquerade') the user-agent whose rules are chosen
* RobotsExclusionPolicy.java, RobotsHonoringPolicy.java
    deleted
* CrawlMetadata.java
    use new string robotsPolicyName as main determinant of policy
    maintain map of available policies ('obey','ignore', and any the operator added)
* CrawlServer.java
    retain Robotstxt instance rather than customized RobotsExclusionPolicy
* PreconditionEnforcer.java
    use full CrawlMetadata rather than just UserAgentProvider subset
    consult RobotsPolicy looked up through CrawlMetadata for allow/disallow decision
* DispositionProcessor.java
    update CrawlServer with Robotstxt only
    consult Robotstxt for crawl-delay
* profile-crawler-beans.cxml (*2), migrate-template-crawler-beans.cxml, selftest-crawler-beans.cxml
    remove old declarations/examples; add new
* ExtractorHTML.java, JerichoExtractorHTML.java
    consult RobotsPolicy.obeyMetaRobotsNofollow for NOFOLLOW
* Robotstxt.java
    new constructors for new use patterns
* **/*Test.java
    update/remove to match new use patterns
2010-09-10 00:27:20 +00:00
gojomo 3e43cf7bd5 * LinkContext.java
undo inadvertent introduction of class-serialization-format incompatibility
2010-09-09 23:22:15 +00:00
gojomo de551ced58 [HER-1801] H3: Unreleased lock causes deadlock when checkpointing
* Frontier.java
    add beginDisposition(), endDisposition() methods
* AbstractFrontier.java
    implement beginDisposition(), endDisposition() methods to maintain dispositions-in-progress lock
* BdbFrontier.java
    acquire exclusive dispositionInProgressLock before allowing checkpoint to begin; release at completion of checkpoint
* ToeThread.java
    call beginDisposition before dispositionChain/finished(); call endDisposition after finished() and on exceptions
* DispositionChain.java
    shed all prior relation to locking/checkpointing
2010-09-03 02:14:41 +00:00
gojomo dbf22ad574 [HER-1480] URIs logged (as -6 or -7) that should never be scheduled
* Extractor.java
    discard special-casing of URI-ignored-scheme
2010-09-03 00:29:05 +00:00
gojomo bc698c09fc [HER-1480] URIs logged (as -6 or -7) that should never be scheduled
* LaxURI.java
    increase tolerance with regard to path-segments
* UURIFactory.java
    allow digits in scheme regex
    discard old supported-schemes code
* UURIFactoryTest.java
    tests for roundtrip serialization of problematic hostlike-scheme and bars-in-path
* CrawlerLoggerModule.java
    discard special-casing of URI scheme errors
* SchemeNotInSetDecideRule.java
    rule to apply to URIs of unknown schemes; by default REJECTs those not usually handled by Heritrix
* **/profile-crawler-beans.cxml
    add REJECT SchemeNotInSetDecideRule
2010-09-03 00:24:13 +00:00
gojomo 8d1083922d [HER-1814] remove dependency on apache commons-pool/GenericObjectPool
* .classpath, pom.xml, org/apache/commons/pool/impl/*
    remove references to and patched classes based on commons-pool
* WriterPool.java
    move instance creation/round-robin-pool/dispose into this class
    close (rather then recycle) extra writers when crawl slows (via tracking time of last need/rollover)
* WriterPoolMember.java
    add isOversize() for external check of ready-to-rollover file
    avoid rollover before every record (so that set of related WARC records aren't split between files)
* ARCWriterPool.java, WARCWriterPool.java
    remove BasePoolableObjectFactory reference, implement class-appropriate makeWriter()
* ARCWriterPoolTest.java
    adjust for new never-timeout behavior
* ARCWriterPoolProcessor.java WARCWriterPoolProcessor.java
    adjust constructor calls
* WriterPoolProcessor.java
    replace poolMaxWaitMs (which caused eventual complete timeout from waiting for writer) with maxWaitForIdleMs, a much smaller value which only controls how long a thread waits for an reusable writer before considering creating a new one. (If creation isn't allowed, threads will now wait indefinitely for a writer to become available.)
2010-08-25 23:25:26 +00:00
gojomo b388479d32 [HER-1727] (W)ARC filename uniqueness guarantees: adminport option, process_id option(?), JVM-global-repeat-suppression
* Heritrix.java
    make heritrix.hostname, heritrix.pid, heritrix.port available as global properties
* PropertyUtils.java, PropertyUtilsTest.java
    utility methods to interpolate string values from one or several supplied Properties instances
* ArchiveUtils.java
    utility methods to give timestamps guaranteed larger/different than any previously-issued timestamp

* WriterPoolSettings.java, WriterPool.java, ARCWriterPool.java, WARCWriterPool.java, ARCWriterPoolTest.java
    improve field names, change 'suffix' to more general 'template'
* WriterPoolMember.java
    replace 'suffix' with 'template' which is interpolated when specific name is needed
    set default template to pattern extremely unlikely to generate duplicate filenames
    change default prefix to 'WEB'
    centralize creation of new basenames into generateNewBasename() method, which internalizes timetamp/serialNo minting and interpolation
* WriterPoolProcessor.java, ARCWriterProcessor.java, WARCWriterProcessor.java
    serve as own WriterPoolSettings instance
    replace 'suffix' with 'template' 
    
* ARCWriter.java
    accept (but truncate) 17-digit timestamps at creation
* DefaultWriterPoolSettings.java, TimestampSerialNo.java
    delete as superfluous
2010-08-20 00:21:43 +00:00
szznax afc2a55e49 fix for [HER-1808] uncaught URLDecoder IllegalArgumentException in ExtractorHTML
* ExtractorHTML.java
    still consider values rejected by URLDecoder
2010-08-13 00:37:55 +00:00
gojomo 9a74685065 correct whitespace 2010-07-27 00:13:16 +00:00
gojomo f08c6bd749 [HER-1801] H3: Unreleased lock causes deadlock when checkpointing
* DispositionChain.java
    ensure lock-release after unhandled runtime exceptions with try-finally
2010-07-12 23:44:36 +00:00
gojomo bba186f333 [HER-1799] H3: expand 'inferred' URI options to optionally include root-page (/)
* ExtractorHTTP.java
    add property inferRootPage; if true (not the default), always consider '/' inferred from all HTTP(S) URIs
* Hop.java, LinkContext.java
    add new hop-type 'I' for inferred URIs; add corresponding LinkContext
* ExtractorImpliedURI.java
    use new 'I'nferred types
2010-07-09 22:39:22 +00:00
gojomo cfc4b347a6 [HER-1796] H3: interval rescheduling becomes erratic after URI rescheduled more than maxRetries times
* CrawlURI.java
    improve comments for fetchAttempts methods
    (resetForRescheduling) added to clear per-scheduling state
* WorkQueueFrontier.java
    call resetForRescheduling just before scheduling-at-specific-time
* FrontierJournal.java, AbstractFrontier.java
    renamings: prefer 'reenqueue' instead of 'reschedule' for describing simple (non-timed) retries
2010-07-09 01:45:26 +00:00
gojomo 829a3f78b3 [HER-1794] Extra white spaces in pom.xml
* **/pom.xml
    remove leading blank lines
2010-07-02 00:51:19 +00:00
gojomo edb70dae06 Fix [HER-1774] TransclusionDecideRule defies expectation when seed redirects with seed-redirects-new-seed enabled
* TransclusionDecideRule.java
    refine further: count 'R's for minimum-hops-necessary-to-transclude, but not for maximum-allowable
2010-06-16 21:51:50 +00:00
gojomo b571730b4b Fix [HER-1774] TransclusionDecideRule defies expectation when seed redirects
with seed-redirects-new-seed enabled
* TransclusionDecideRule.java
    evaluate(): skip over 'R' hops without counting them as transcludes
2010-06-14 23:30:22 +00:00
gojomo 8b696da475 * CrawlURI.java
dump more info if code that really shouldn't run actually runs
2010-06-04 22:27:59 +00:00
gojomo f81a941d97 HER-1010 crawl favicon.ico
* ExtractorHTTP.java
    consider /favicon.ico 'discovered' from every other HTTP fetch
* Extractor.java
    utility method addOutlink()
2010-06-01 23:36:16 +00:00
nlevitt 0dbc773fc8 Followup on HER-1728 - treat flashvars strings more like url query strings
(key=value&[key=value]*)
* ExtractorHTML.java
    considerQueryStringValues(): split pairs on "&" instead of ";" and
    url-decode values
2010-05-15 02:13:19 +00:00
nlevitt f7a9327334 Fix for [HER-1772] NullPointerException in ExtractorHTML related to flashvars
* modules/src/main/java/org/archive/modules/extractor/ExtractorHTML.java
    processGeneralTag(): check for null nameVal
2010-05-11 22:11:38 +00:00
gojomo e3c608fab4 HER-1762 H3 performance tuning
* ExtractorHTML.java
    smaller caps on element-name, attribute-name, attribute-value lengths -- costly match-failures on bad/non-HTML may be eating a lot of cycles
2010-04-29 23:21:38 +00:00
gojomo 27cca4da60 Refinement of HER-1737 excessive job.log WARNINGs for misreported encoding (FLV reported as text/html;charset=UTF-8
* ReplayCharSequence.java, GenericReplayCharSequence.java, InMemoryReplayCharSequence.java
    store actual first exception for reference
* ExtractorHTML.java
    report exception in nonfatal-log, rather than WARNING (which was still polluting job log more than desired -- but should still be logged to allow future investigation of sites where encoding issues may exist)
2010-04-24 02:22:24 +00:00
gojomo 792d8e528b HER-1766 The use of the MatchesFilePatternDecideRule with the CUSTOM preset causes a fatal error (infinite loop)
* MatchesFilePatternDecideRule.java
    fix getRegex() to super.getRegex()
2010-04-23 22:16:25 +00:00
gojomo a7caceb8ad HER-1737 excessive job.log WARNINGs for misreported encoding (FLV reported as text/html;charset=UTF-8
* ReplayCharSequence.java
    new interface method: getDecoderExceptionCount(), reporting >0 if any decoding problems were encountered and silently replaced
* GenericReplayCharSequence.java
    count decoding problems, and only log as FINE rather than WARNING
* InMemoryReplayCharSequence.java
    try decoding with reporting; if any problems note at least one then decode without reporting errors
* ExtractorHTML.java
    after using ReplayCharSequence, log WARNING if nonzero decoding errors
2010-04-23 04:11:53 +00:00
gojomo cb5ec19b6c HER-1765 quiet excessive INFO level logging
* GenericReplayCharSequence.java
* Scoper.java
* FetchFTP.java
* FetchHTTP.java
    demote a bunch of INFO logging to FINE so that be default, console isn't filled with output for every URI handled by a busy crawl
2010-04-23 00:44:25 +00:00
gojomo c1207582c4 HER-1728 Heritrix could be enhanced to parse flashvars parameter to correctly extract the links
* ExtractorHTMLTest.java
    tests for embed/@flshvars, param[@name=flashvars]/@value likely-URI discovery
* ExtractorHTML.java
    move likely-URI testing to UriUtils
    add FLASHVARS support
* JerichoExtractorHTML.java
    use UriUtils ikely-URI testing
    add FLASHVARS support
2010-04-22 01:27:24 +00:00
gojomo f933dc922d HER-1763 unify/improve/document likely-URI string tests
* UriUtils.java
    move likely-URI heuristics here for better consistency, reuse, testing, improvement
* UriUtilsTest.java
    testing for UriUtils
* ExtractorJS.java
    move likely-URI support to UriUtils; use new test
* ExtractoSWF.java
    use new UriUtils likely-URI testing
* ExtractorHTML.java
    move likely-URI testing to UriUtils, use new test
* JerichoExtractorHTML.java
    use new UriUtils likely-URI testing
2010-04-22 01:08:14 +00:00
gojomo affa3b672c HER-1620 Tolerate trailing '*' in robots disallow (& allow?) rules
* Robotstxt.java
    trim single trailing '*' if present (assume unintentional or redundant)
2010-04-13 22:46:23 +00:00
gojomo 647a0b3edf HER-1754 treat robots.txt non-response as 404 (optionally?)
* CrawlServer.java
    enable a specific kind of connect-lost (no response given) to be counted as 'deemed 404' on robots retries over a minimum
* FetchStatusCodes.java
    add a synthetic code: -404, S_DEEMED_NOT_FOUND
* FetchHTTP.java
    better distinguish CONNECT_FAILED and CONNECT_LOST
* DispositionProcessor.java
    treat CONNECT_LOST same as _FAILED; simplify a test
2010-04-02 03:55:12 +00:00
gojomo fd5644f109 HER-1627 followup: show error rather than match faulReadSize
* PersistProcessor.java
    rename setupEnvironment to setupCopyEnvironment to make limited purpose of env clear; catch and rethrow IllegalArgumentException with hint that second-open may be cause
* PersistLoadProcessor.java 
    catch and display IllegalArgumentException same as other failure-to-open SEVERE but proceedable exceptions
* PrecedenceLoader.java
    update method names
2010-03-26 01:02:48 +00:00
szznax 9f77412581 part of fix for HER-1627 incorrect source tag in crawl.log (of persist-loaded crawl)
* EnhancedEnvironment.java
    in getClassCatalog(), when read-only env, insist on read-only catalog
* PersistLoadProcessor.java
    remove existing curi members from prior to prevent clobbering source
* PersistProcessor.java
    set historyDbConfig read-only, set je.log.faultReadSize for
        compatability with BDBModule.setup()
2010-03-23 20:52:40 +00:00
nlevitt 20b8a7bc90 mention url in question in debug level logging 2010-03-19 18:39:14 +00:00
szznax e9df65d446 fix for HER-1744 Incorrect comparison of Strings in ProcessorChain.process() with "!=" operator
* ProcessorChain.java
    use equals() to compare string values rather than objects (with "!=")
2010-02-16 19:13:43 +00:00
gojomo 1a95e530e8 Clean-up where assumption of serializability no longer appropriate 2010-01-26 01:25:47 +00:00
gojomo b9ab0b296d [HER-1731] Unable to set HTTPProxyPort on org.archive.modules.fetcher.FetchHttp
* FetchHTTP.java
    make getter/setter types agree
2009-12-28 01:56:32 +00:00
nlevitt df6e31697d Rename short report methods:
- singleLineReport() -> shortReportLine()
 - singleLineReportTo() -> shortReportLineTo()
 - singleLineReportData() -> shortReportMap()
2009-12-09 02:53:02 +00:00
gojomo cb7df416d4 post-3.0.0 release build
* **/pom.xml
    bump version identifiers to "3.1.1-SNAPSHOT" (odd minor number meaning dev version, odd patch number indicating expected next patch number of 3.0.x release if before a 3.2.0 release)
2009-12-05 23:48:38 +00:00
gojomo 5661658b1b prep for 3.0.0 release
* **/pom.xml
    bump version-id to "3.0.0"
* README.txt
    refer to exactly 3.0.0 release notes
2009-12-05 09:28:19 +00:00
gojomo dd4a8d4705 [HER-1718] misleading "writer subdirectory" shown in webui
* WriterPoolProcessor.java
    change description of WriterPoolProcessor.directory ConfigPath to not imply as strongly that is where writing much be occurring
2009-12-03 08:41:08 +00:00
gojomo ed2061560e Improve Maven build robustness
* UURIFactoryTest.java
    specify stirng literal with escape-encoding, rather than as raw UTF-8
* **/pom.xml
    include 'project.build.sourceEncoding' property to suppress platform-encoding warnings
    (unfortunately, neither this nor similar 'maven.compile.encoding' property actually casues maven build to interpret Java source as UTF-8)
2009-12-02 01:34:40 +00:00
nlevitt 8ba641ed4b Part of [HER-1603] Restletify: xml representations of all resources that also
offer html
* XmlMarshaller.java
    new class to write xml based on nested map structure
* BeanBrowseResource.java ScriptResource.java EngineResource.java
  JobResource.java JobRelatedResource.java
    support xml representation
* WorkQueueFrontier.java PrecedenceProvider.java WorkQueue.java ToeThread.java
  ToePool.java CrawlJob.java Engine.java Frontier.java CrawlController.java
  StatisticsTracker.java CrawledBytesHistotable.java FetchStats.java
  ProcessorChain.java CrawlURI.java Reporter.java
    offer same data that is returned in the single line reports in a map
    suitable for use with XmlMarshaller
* FileUtils.java
    new method tryToCanonicalize(File)
2009-11-25 01:43:57 +00:00
gojomo 79fd64a2b5 Post-RC1-build
* **/pom.xml
    revert version name to SNAPSHOT
2009-11-23 10:23:28 +00:00
gojomo 0c7a74bd35 RC1
* **/pom.xml
    rename version to '3.0.0-RC1' for distinguished 'RC1' identified build (instead of SNAPSHOT/timestamp)
2009-11-23 09:57:42 +00:00
gojomo 18e165f21e [HER-1714] fixed-interval rescheduling
* AbstractFrontier.java, WorkQueueFrontier.java, BdbFrontier.java
    add 'futureUris' map of CrawlURIs to be reenqueued at specific future dates
    the usual findEligibleUri also checks for newly-eligible rescheduled URIs
    the frontier is no longer empty unless the future count is also 0
* CrawlURI.java
    add rescheduleTime property
* ReschedulingProcessor.java
    optional post-processor to set a CrawlURI's reschedulingTime
* CrawlStatSnapshot.java, CrawlJob.java
    add futureUriCount to stats/uriTotalsReport
2009-11-23 08:47:14 +00:00
gojomo 5b6b2fe954 BDBJE updates, refactoring
* BdbModule.java
    (openDatabase) all databases now 'managed'
    (getStoredMap) all reuse of prior data as for checkpoints
* (others)
    match above changes
2009-11-23 08:18:41 +00:00
gojomo daab317c94 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
processor-related bean checkpoint support:
* Checkpoint.java
    move to commons for proper dependency graph
* (others) 
    recognize above
2009-11-20 01:10:32 +00:00
gojomo fbd3af35ac [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
* PersistLogProcessor.java
    rotate logs on checkpoint
* CrawlerJournal.java, FrontierJournal.java
    rotate for checkpoint support without full Checkpointable
2009-11-20 00:47:54 +00:00
gojomo 124d1524d9 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
processor-related bean checkpoint support:
* Processor.java
    implement Checkpointable and BeanNameAware; methods to support JSON state-saving
* DispositionChain.java
    implement Checkpointable and during-checkpoint disposition-lockout for state stability
2009-11-19 23:10:13 +00:00
gojomo 2bb65e9200 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
processor-related bean checkpoint support:
* Processor.java
    implement Checkpointable and BeanNameAware; methods to support JSON state-saving
* DispositionChain.java
    implement Checkpointable and during-checkpoint disposition-lockout for state stability
* **Extractor**.java
    pull common reporting & checkpointing up to Extractor.java
* WriterPoolProcessor.java
    implement Checkpointable; freeze and roll writer-pool during checkpoint
* PersistLogProcessor.java
    roll log on checkpoint
* TextSeedModule.java, SeedModule.java
    eliminate obsolete (and probably unnecessary) checkpoint support
* (others)
    adapt to above changes
2009-11-19 22:52:39 +00:00