Commit Graph
330 Commits
Author SHA1 Message Date
gojomo 52d00a9917 Prep for 3.1.0-beta
* **/pom.xml
    increment declared version
2011-04-15 18:09:43 +00:00
gojomo 1a2ec76805 comment typo, missing serialization ID 2011-04-15 18:08:12 +00:00
nlevitt e60fd8b0e1 * XmlMarshaller.java
marshalDocument() - SAXException can wrap other exceptions, e.g.
    EOFException when tcp connection is broken; thus, in case of IOException,
    rather than throwing a RuntimeException, re-throw the wrapped IOException
    (unfortunately in that case we still get a massive stack trace in the log,
    but at least it comes from the appropriate spot and is not too misleading)
2011-03-02 01:34:19 +00:00
nlevitt 17b12ca19b * HostsReport.java
url-encode hosts (other than "dns:") in host report, in case of hostname
    containing whitespace or other unusual characters, which can happen
2011-03-01 23:43:58 +00:00
nlevitt f03b1ac689 * URIAuthorityBasedQueueAssignmentPolicy.java
rename "whois" queue to "whois..." to avoid conflicting with queue for
    theoretical hostname "whois"
2011-02-19 02:10:39 +00:00
nlevitt 4991b295bc HER-1645 whois fetcher
* URIAuthorityBasedQueueAssignmentPolicy.java
    whois urls all go in special "whois" queue
* PreconditionEnforcer.java, CrawlURI.java
    move markPrerequisite() method from PreconditionEnforcer to CrawlURI
* profile-crawler-beans.cxml
    commented-out whois fetcher clause
* FetchStatusCodes.java
    new status codes for whois
* ServerCache.java
    getHostFor() - return "whois:" for whois urls, following dns: convention
* UURIFactory.java
    ugly hack for whois urls
* SchemeNotInSetDecideRule.java
    add whois to list of supported schemes
* WriterPoolProcessor.java
    shouldWrite() - we should write successful whois fetches
* WARCWriterProcessor.java
    write whois records
* FetchWhois.java
    the fetcher
2011-02-17 22:33:28 +00:00
gojomo 61dc661f47 * TopNSet
resolve strange type complaint in my Windows Eclipse JDK6u24 setup
2011-02-17 01:13:37 +00:00
gojomo 9e53f8be7c [HER-1867] make H3 ssl adhoc self-signed certificate valid for longer (appears to expire after 90 days)
* Heritrix
    pass '-validity 3650' to KeyTool
2011-02-14 22:07:10 +00:00
nlevitt 9468cb0c1f Report total bytes, as well as breakdown, in xml version of job page, to match
html.
* CrawlJob.java
    sizeTotalsReportData() - add "total" (bytes) and "total-count" (urls) to map
* CrawledBytesHistotable.java
    new method getTotalUrls() to complement getTotalBytes()
2011-02-09 01:17:26 +00:00
gojomo f58fdcdba4 * Heritrix
use heritrix.home, if available, to find default logging.properties (to let those who launch Heritrix from elsewhere save themselves from HttpClient's copious logging)
2011-02-05 03:26:02 +00:00
nlevitt 244c1cf563 Update to latest restlet 1.1.10. It includes Daniel Truemper's fix for the
restlet bug he discovered while using heritrix, which I ran into.
http://tech.dir.groups.yahoo.com/group/archive-crawler/message/6338
http://restlet.tigris.org/issues/show_bug.cgi?id=1018
http://restlet.tigris.org/source/browse/restlet?view=rev&revision=6135
* .classpath
* engine/pom.xml
2011-02-05 00:36:11 +00:00
gojomo d22ab1cb6d * PreconditionEnforcer
prefer 'protected' over 'private'
2011-01-28 00:22:02 +00:00
gojomo c2027b7a30 * SimpleSelfTest
more useful assertEquals
2011-01-26 03:11:17 +00:00
gojomo 8212d1c0dd [HER-1860] H3: Remove dependence on GC/finalization/PhantomReference magic in used ObjectIdentityCache implementation
* StatisticsTracker
    move small stat maps to in-memory ConcurrentMaps
    update processedSeedRecords for new ObjectIdentityCache shape
    move hostsDistribution/hostsBytes/hostsLastFinished tracking to CrawlHosts/hostsCache
* CrawlSummaryReport
    gets hosts count from hostsCache
* SeedRecord
    implement IdentityCacheable
* FetchStats
    remember last-success times
2011-01-20 23:36:50 +00:00
gojomo 6bdc7642b4 * CrawlController
ensure final stat snapshot before stop
2011-01-20 23:29:59 +00:00
gojomo 0b577c1245 [HER-1860] H3: Remove dependence on GC/finalization/PhantomReference magic in used ObjectIdentityCache implementation
* IdentityCacheable
    new interface required of objects stored in ObjectIdentityCaches
* IdentityCacheableWrapper
    wrapper for storing arbitrary objects in ObjectIdentityCaches
* ObjectIdentityCache
    keys now always Strings
    values now always IdentityCacheables
    new dirtyKey() method to ensure a key is persisted
* ObjectIdentityBdbCache, ObjectIdentityMemCache
    update for new ObjectIdentityCache shape; still using legacy GC magic
* ObjectIdentityBdbManualCache
    alternate implementation relying on dirtying to ensure persistence
    use Guava library MapMaker for soft memMap; capped dirtyMap
* BdbModule
    use ObjectIdentityBdbManualCache by default
    up expectedConcurrency default to 64
* BdbModuleTest, ObjectIdentityBdbCacheTest, ObjectIdentityBdbManualCacheTest
    update, add tests
* Frontier
    FrontierGroup as IdentityCacheable
* AbstractFrontier, WorkQueueFrontier, BdbFrontier
    touchup queue/group accessors
    make queue instances dirty whenever mutated 
* WorkQueue, CrawlHost, CrawlServer
    IdentityCacheable support; appropriate makeDirty()s
* ServerCache, DefaultServerCache
    update for new ObjectIdentityCache shape
2011-01-20 23:28:38 +00:00
gojomo c782714b55 [HER-1834] log-bloat, memory problems when hopsPath grows endlessly with no max-hops limit set
* BdbMultipleWorkQueuesTest
    use setOrdinal rather than now-gone constructor
2011-01-19 04:16:18 +00:00
gojomo 6795b3bfba [HER-1834] log-bloat, memory problems when hopsPath grows endlessly with no max-hops limit set
* CrawlURI
    MAX_HOPS_DISPLAYED constant, 50
    build new CrawlURI pathFromSeed value via extendHopsPath, which shows only MAX_HOPS_DISPLAYED hops, and precedes string with int value of hops unshown
* CrawlURITest
    test for extendHopsPath
2011-01-19 02:30:42 +00:00
gojomo 823aaf0154 Add Javadoc class comment notes about (potentially) left-open-by-design ReplayCharSequence instances 2011-01-18 01:32:26 +00:00
nlevitt cf597b2796 Fix fix on commented out scope.logToFile - default value is false 2011-01-17 22:53:43 +00:00
nlevitt c966301100 Fix commented out scope.logToFile 2011-01-17 22:51:33 +00:00
nlevitt 6de68e3e36 Let Recorder remember its replayCharSequence, and ToeThread close it when uri
processing is finished.
* Recorder.java
    getReplayCharSequence() - remember ReplayCharSequence, obtain new one if
        none remembered or remembered has been closed
    endReplays() - close replayCharSequence
* ToeThread.java
    run() - call Recorder.endReplays() when finished with uri
* ReplayCharSequence.java
    isOpen() - return false if close() has been called
* GenericReplayCharSequence.java, InMemoryReplayCharSequence.java
    implement isOpen()
* KeyWordProcessor.java, ExtractorHTML.java, HTTPContentDigest.java,
  ExtractorCSS.java, ExtractorXML.java
    do not close ReplayCharSequence
2011-01-15 03:13:27 +00:00
gojomo cbd65d8350 [HER-1848] Add option to disable link-extraction from 404 error pages
* AbstractFrontier
    add new/renamed ExtractorParameters methods
2011-01-15 01:32:54 +00:00
gojomo 5fe28f2ecc [HER-1858] H3: frontier futureUris (rescheduling) unreliable for otherwise empty frontier/queue
* WorkQueue.java
    add noteExhausted() for emptied queues
* WorkQueueFrontier.java
    add synchronization around checkFutures() activity
    use noteExhausted when queue is totally empty
2011-01-12 00:21:40 +00:00
nlevitt 36515bdbf6 Part of HER-1857. Rename textSource->surtsSource, and make old surtsSourceFile
a facade for surtsSource.
2011-01-11 20:42:05 +00:00
nlevitt 64a25031e4 * engine/src/main/resources/org/archive/crawler/restlet/profile-crawler-beans.cxml
synch with engine/src/main/resources/org/archive/crawler/restlet/profile-crawler-beans.cxml
2011-01-09 21:33:37 +00:00
nlevitt 8b510facc5 * CrawlerLoggerModule.java
setupSimpleLog() - use existing utility method for timestamp format
2011-01-07 23:34:08 +00:00
nlevitt 14f4d01be6 * Scoper.java
use new logToFile paradigm a la DecideRuleSequence
2011-01-07 02:38:11 +00:00
nlevitt dd439dac3b Fixes and improvements to to DecideRuleSequence/logToFile.
* DecideRuleSequence.java
    - use Spring Lifecycle start() to initialize logToFile
    - inject logger module as SimpleFileLoggerProvider, since we're in
      heritrix-modules and don't have access to CrawlerLoggerModule from
      heritrix-engine
* CrawlerLoggerModule.java
    - implement SimpleFileLoggerProvider
    - setupSimpleLog() - use 'T' instead of '+' between date and time in
      timestamp
* SimpleFileLoggerProvider.java
    new interface with one method, setupSimpleLog()
* Scoper.java
    do not call scope.start()/scope.stop(), these are handled using Spring
    Lifecycle now
* DecideRule.java
    remove unused, unneeded start()/stop()
2011-01-07 02:09:31 +00:00
gojomo bdd7f7e1ab Fix exceptions at launch, post-crawl-finish
* KryoBinding.java
    always default to registrationOptional, for now
* StatisticsTracker.java
    explicitly set valueClass of sourceDistribution to ConcurrentHashMap
* StoredQueue.java
    answer 0 for size() when backing DB closed
2011-01-07 01:24:38 +00:00
nlevitt 93cf655bed Add logToFile support to DecideRuleSequence. File is logs/{spring-bean-id}.log,
format: [timestamp] [decisive-rule-num] [decisive-rule-class] [decision] [uri]
* Scoper.java
    start(),stop() - call scope.start()/scope.stop()
* CrawlerLoggerModule.java
    setupSimpleLog() - new logToFile paradigm
* DecideRule.java
    start(),stop() - noop
* DecideRuleSequence.java
    logToFile support
* profile-crawler-beans.cxml
    <!-- <property name="logToFile" /> -->
2011-01-06 18:39:19 +00:00
gojomo ea49e55c89 [HER-1850] IllegalStateException from WorkQueueFrontier.wakeQueues in BlockIterator
* WorkQueueFrontier.java
    double in-memory snoozedClassQueues size
    protect all adds/removes to snoozedOverflow in synchronized blocks
2010-12-09 22:28:20 +00:00
gojomo c1b8138d4d [HER-1762] H3 performance tuning
Charset lookup sync de-bottlenecking
* org/apache/commons/httpclient/EncodingUtil.java
    use explicit Charset instances or cached to minimize lookups
* LaxURLCodec, BdbMultipleWorkQueues
    use explicit Charset instances
2010-12-06 19:47:49 +00:00
gojomo 85e4123b3c * TopNSet
refactor to narrow synchronized areas
2010-12-03 01:03:41 +00:00
gojomo 1c8f9374f6 [HER-1845] recovery process generates duplicated F+ entries in new recovery log
* AbstractFrontier
    remove redundant logging
2010-11-23 01:25:17 +00:00
kristinn_sig e90eff9c84 [HER-1843] Possible int overflow in CheckpointService.java
* CheckpointService
  Made checkpointIntervalMinutes setter accept a long instead of an int (was missed when the class variable was made a long). While it was non-harmful the way it was, this is more in line with Java conventions.
2010-11-18 08:53:56 +00:00
kristinn_sig 675d71d557 [HER-1843] Possible int overflow in CheckpointService.java
* CheckpointService
  Conversion from mintues to milliseconds is now done using all longs, preventing an int overflow.
  Removed errant semi-colon.
2010-11-18 00:46:06 +00:00
gojomo ba4b01261e [HER-1838] H3: job-not-found 404 not very clear
* EngineApplication
    better message for simple 404
    (contributed by Matt Warhaftig)
2010-11-16 23:17:37 +00:00
gojomo 600a4ca326 Fix selftest failures where empty 'profile' directory may not exist (eg git)
* SelfTestBase
    ...and make a tmp empty directory instead
2010-11-16 01:01:31 +00:00
gojomo c170390c0d Fix selftest failures where empty 'profile' directory may not exist (eg git)
* SelfTestBase
    only copy profile directory if it exists
2010-11-16 00:58:13 +00:00
gojomo cb7f96682b Remove synchronization on frontier methods; rely on safe queues, synchronization-per-WorkQueue instead
* AbstractFrontier
    remove inbound/outbound queues; simplify managerThread
    perform findEligible/schedule/receive/finish immediately
* WorkQueueFrontier
    eliminate holdQueues setting 
    synchronize sendToQueue on target queue
    make findEligibleUri reentrant; rely on [Blocking|Stored]Queue thread-safety
    make arriving at front of ready trigger for 'active'/budget-session
    simplify inactiveQueues management
    simplify waking from overflow
* WorkQueue
    redefine 'active' as in-budget-session
    rename 'held' as 'managed'
    synchronize major methods, relying on allQueues cache that operations on same intended queue use identical instance
    split over-budget test to isOverSessionBudget and isOverTotalBudget
    have toString show classKey
* BdbFrontier
    checkpoint fixes: remember nextOrdinal, rotate frontier-recover log, reset queues on recovery
    consistencyCheck method for probing state during stress tests
2010-11-15 22:56:03 +00:00
gojomo c8074bdbf3 Improve ability to force-terminate crawls
* RecordingInputStream.java
    check for interrupt on each socket-timeout
* CrawlController.java
    on second requestCrawlStop, interrupt threads via ToePool.cleanup
* ToePool.java
   adjust for new earlier/repeated cleanup
* ToeThread.java
   better warnings/recovery on forced-interrupts
2010-11-15 22:26:36 +00:00
gojomo d4f5004b9c Lessen synchronization bottleneck on crawl.log
* UriProcessingFormatter.java
    allow pre-caching of a specific LogRecord's formatted version, outside the synchronized publish()
* GenerationFileHandler.java
    force a format before publish(), to benefit above (a small hit in other cases where it's redundant)
2010-11-15 21:01:37 +00:00
gojomo 1501e1ddd1 * ScriptResource.java
flush rather than close, avoiding console dump
2010-11-15 20:59:45 +00:00
gojomo 6a2716ce00 Reduce synchronization bottlenecks
* FrontierJournal, CrawlerJournal
    do barest minimum inside 'synchronized' method
2010-11-12 19:37:52 +00:00
gojomo 301b943f03 Consolidate ModuleAttributeConstants into CoreAttributeConstants
* (many)
    distinction between these two constant-collecting classes was fuzzy (to the point that they already referred to each other), and they were both in same subproject/package already as well; so, merged constants into the larger, older class
2010-11-09 23:47:37 +00:00
gojomo 6452013af7 Frontier throughput experiments & fixed, continued
* WorkQueueFrontier
    (findEligibleURI) avoid outbound.capacity-sensitive activation, which under a race created by recent changes led to infinite recursion here
* AbstractFrontier
    (next) when nothing is immediately ready, try adding one-at-a-time to outbound, rather than fillOutbound()
2010-11-09 23:32:12 +00:00
gojomo ad57749dea * WorkQueueFrontier.java
debugging output for reported findEligibleURI deep-recursion
2010-11-08 23:45:19 +00:00
gojomo b5eb4f3c1e * AbstractFrontier
reduce size of inbound now that many threads will opportunistically clear it
2010-11-08 23:44:43 +00:00
gojomo 3dc5f04c06 Avoid deadlock on terminate() of already-paused/stopping crawl
* AbstractFrontier
    (managementTasks) don't synchronize around possibly-blocking take(), only around process()
2010-11-08 21:06:58 +00:00