Commit Graph
321 Commits
Author SHA1 Message Date
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
gojomo 3be9941f76 Resolve deadlock seen after latest changes
* AbstractFrontier
    (drainInbound) don't assume current thread will be able to take() full batch; poll() and exit early if other threads have drained queue first
2010-11-08 18:54:03 +00:00
gojomo f12e940edd Discard 'CredentialAvatar' -- no longer needed with Spring settings -- use Credential instances directly 2010-11-06 03:45:00 +00:00
gojomo c7398ce463 Experiment to work-around Frontier.managerThread bottleneck
* AbstractFrontier, WorkQueueFrontier
    synchronize around all InEvent/findEligibleURI actions, so that drainInbound and fillOutbound may be called outside managerThread
    whenever a ToeThread would block on enqueue() or next(), try the appropriate catch-up method before blocking
    remove assertions no longer true with activity happening outside managerThread
2010-11-06 02:14:39 +00:00
gojomo 0627a67dce Minimize transient garbage volume by optimized serialization based on the 'Kryo' library
* AutoKryo
    extension of Kryo to allow classes to control their own registration, trigger registration of associated classes, and deserialize classes without no-arg constructors
* KryoBinding
    binding for use with BDB that uses AutoKryo serialization for a 2X-4X reduction in byte[] size
* UURI
    improved serialization via Externalizable and Kryo's CustomSerialization methods
* BdbModule
    discard deprecated CachedBDBMap option
    (getObjectCache) extend with both declaredClass and valueClass (for when map values are specializations of the declared type, as with frontier.allQueues)
    adjust type declarations
* ObjectIdentityBdbCache
    use KryoBinding rather than SerialBinding
* CachedBdbMapTest
    discarded
* BdbFrontier, BdbServerCache, StatisticsTracker
    adjust type declarations, objectCache creation
* BdbMultipleWorkQueues
    use KryoBinding rather than (Recycling)SerialBinding
* BdbWorkQueue, CrawlServer, CrawlHost, CrawlURI
    add autoregister support
* LinkContext
    public for kryo registration
2010-11-05 23:23:58 +00:00
gojomo f4d69b37da Minimize transient garbage creation identified by allocation profiling
* UURIFactory, canonicalize/**, PathologicalPathDecideRule, ExtractorHTML
    use recycled matchers via TextUtils
* CrawlURI, KeyedProperties, OverlayContext, SheetOverlaysManager
    use ArrayList and indexed access rather than LinkedList and iterator instances
2010-11-05 21:34:53 +00:00
nlevitt acedca1788 Part of [HER-1836] let more than one extractor run on a single url - new
setting "independentExtractors" - when enabled, extractors run regardless of
whether other extractors have run
* profile-crawler-beans.cxml, AbstractFrontier.java, ExtractorParameters.java,
  Extractor.java
    new setting independentExtractors
* ContentExtractor.java
    shouldProcess() - respect independentExtractors
2010-10-26 23:49:42 +00:00
gojomo d72e6cd1d0 [HER-1830] H3: improve sheet examples in default configuration CXML
* **/profile-crawler-beans.xml
    only 1 example SurPrefixesSheetAssociation
2010-10-01 00:16:23 +00:00
gojomo 13d8c4f851 [HER-1830] H3: improve sheet examples in default configuration CXML
* **/profile-crawler-beans.xml
    example SurPrefixesSheetAssociation
2010-09-30 23:01:25 +00:00
gojomo a757140cf6 [HER-1831] change version numbering convention to be less confusing
* **/pom.xml
    change 3.1.1-SNAPSHOT to 3.0.1-SNAPSHOT
2010-09-30 19:48:35 +00:00