187 Commits

Author SHA1 Message Date
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 7d0061884c Prevent timing NPEs on CrawlLimitEnforcer-triggered crawl end
* AbstractFrontier.java
    close recovery log in stop() (comes later, usu. from managerThread) rather than terminate() (earlier, may occur in other threads like progress-stats-snapshot thread)
2009-12-05 00:55:55 +00:00
gojomo 21d4bce819 correct typo in built-in profile templates
* org/archive/crawler/restlet/profile-crawler-beans.cxml, org/archive/crawler/migrate/migrate-template-crawler-beans.cxml
    Percentage -> Percent
2009-12-05 00:16:55 +00:00
nlevitt 4da5095212 Keep html spartan for now.
* EditRepresentation.java 
    write() remove background color and font size styling on textarea
2009-12-04 23:30:24 +00:00
nlevitt e85972848d Format, indent xml. See discussion on [HER-1603].
* XmlMarshaller.java
    (constructor) enable xml formatting/indentation
2009-12-04 23:16:35 +00:00
nlevitt 29e8b05308 Improvement to [HER-1603?focusedCommentId=22557] fix
* BaseResource.java
    getPreferredVariant(): always prefer HTML if anything in the header
    indicates it's acceptable (even "*/*" with low q-preference)
2009-12-04 23:09:24 +00:00
nlevitt c3539d3fdc Fix for [HER-1603?focusedCommentId=22557] browsers based on WebKit (Safari,
iPhone Safari, Chrome) use a screwy 'Accept' header that if taken literally
means they prefer 'application/xml' content. Thus trying to view web UI in
these browsers results in seeing the XML version, without element markup
* BaseResource.java
    override getPreferredVariant() to bump up preference level of text/html for
    any client can accept it
* EngineResource.java, JobResource.java
    inherit from BaseResource
2009-12-04 22:56:25 +00:00
gojomo 04012279fc Misc logging-cleanup/refactoring
* CrawlerJournal.java
    improve exception logging
    combine writeLine() methods to use varargs
* FrontierJournal.java
    improve exception logging
* ArchiveUtils.java
    replace ignored  count parameter with meaingful boolean one
* CrawlURI.java
    use updated ArchiveUtils method
2009-12-04 22:23:48 +00:00
nlevitt 67a25f2dce * CheckpointService.java
getAvailableCheckpointDirectories() - avoid NullPointerException when
    checkpoints dir does not exist
2009-12-04 00:52:55 +00:00
gojomo e1bbbf5a59 [HER-1704] WorkQueueFrontier.snoozedClassQueues not bounded in size, not reported in useful order
* WorkQueueFrontier.java
    add snoozedOverflow map of (wakeTime)->(DelayedWorkQueue) for snoozes over a capped size
    maintain in parallel to snoozedClassQueues DelayQueue, maintain atomic size count
    in standard report, presort snoozedClassQueues before displaying
* DelayedWorkQueue.java
    move to top-level so serialization doesn't pull out whole frontier
* BdbFrontier.java
    initialize snoozedOverflow
* BdbMultipleWorkQueues.java
    improve error message seen on problematic checkpoint-recovery
2009-12-03 19:37:27 +00:00
gojomo 095f2fdffb Make Maven build more robust
* engine/pom.xml, .classpath
    remove apparently-no-longer-needed tomcat library reference, avoiding Maven problems with m2eclipse 0.9.8.200905041414 in eclipse-galileo on ubuntu
2009-12-03 19:02:13 +00:00
gojomo 950e68091c UI touchup
* EngineResource.java
    give add-job options their own header, reorder/reword for clarity
* JobResource.java
    return to always showing 'checkpoint' button, disable if necessary, so main control buttons aren't appearing/disappearing or moving
2009-12-03 18:28:21 +00:00
gojomo 757dbf3f19 Output/UI touchup
* CheckpointService.java
    list checkpoint directories in reverse-last-modified order
    disable dubugging output to System.err
2009-12-03 18:24:17 +00:00
gojomo f3f7a98240 [HER-1708] h3 - crawl summary report byte totals off somehow
* CrawlSummaryReport.java
    relabel, reorder, regroup displayed values for simplicity/consistency
2009-12-03 03:12:38 +00:00
nlevitt 19b9833fb4 Fix (harmless?) stack trace from closing output too early. It looked like this:
==========
2009-12-03 01:36:16.726 SEVERE thread-10 com.noelios.restlet.http.HttpServerConverter.commit() An exception occured writing the response entity
java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:26)
        [...]
2009-12-03 01:36:16.733::WARN:  Committed before 500 An exception occured writing the response entity
2009-12-03 01:36:16.735 WARNING thread-10 com.noelios.restlet.http.HttpServerHelper.handle() Error while handling an HTTP server call: 
==========
* JobResource.java
    writeHtml(Writer) - do not close writer
2009-12-03 01:40:42 +00:00
nlevitt 6edbc5181e [HER-1721] pressing build immediately after adding or creating a new job gives
IOE
* JobResource.java
   presentablify(), writeHtml() - make sure crawl log exists before attempting
   to read and serve it
2009-12-03 01:26:26 +00:00
gojomo e15f49dd60 [HER-1708] h3 - crawl summary report byte totals off somehow
* CrawlController.java
    send event of crawl-end before appCtx.stop()
* StatisticsTracker.java
    force final progressStatisticsEvent and dumpReports at crawlEnded() before stop()
    add force-dump of reports (so dumpReports never reuses prior reports)
* CrawledBytesHistotable.java
    add getTotalBytes(), a total of just the byte-counts (getTotal() includes URI counts)
* CrawlStatSnapshot.java
    use getTotalBytes()
2009-12-02 06:25:23 +00:00
nlevitt e3fc474ca4 Return http 404 when appropriate.
* BeanBrowseResource.java
* JobResource.java
2009-12-02 03:24:11 +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 75fa939995 Update restlet to latest 1.1.6
* .classpath
* engine/pom.xml
2009-11-25 01:49:17 +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 a1022c8246 [HER-1711] Some Internationalized Domain Name seeds ignored by Heritrix
* EnhDirectoryResource.java
    ensure files shown for edit or written-back to disk handled as UTF-8
* ConfigFile.java
    read file as UTF-8
2009-11-25 01:14:59 +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 3c9df9a8c6 BDBJE updates, refactoring
* BdbFrontier.java
    use BdbModule.openDatabase()
2009-11-23 08:24:54 +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 4127286a1c Checkpoint cleanup
* Checkpoint.java
    calculate shortName correctly
* CrawlerLoggerModule.java
    use full checkpoint-name for log-rotation-suffix
2009-11-23 08:10:07 +00:00
gojomo eb9bf5a8e2 BDBJE updates, refactoring
* commons/pom.xml, .classpath
    update to BDB-JE 4.0.71
* BdbModule.java
    (getStoredQueue) added
    (getStoredMap) made more general
    (openDatabase) all databases now 'managed'
* TempStoredSortedMap.java -> DisposableStoredSortedMap.java
    renamed
* StatisticsTracker.java, **Report.java
    use new name
* StoredQueue.java, StoredQueueTest.java
    move to org.archive.bdb package
* BdbMultipleWorkQueues.java, PrefixFinderTest.java
    update for BDB-JE 4 changes
* BdbFrontier.java
    use getStoredQueue 
    drop unneeded custom serialization support
* WorkQueueFrontier.java
    drop unneeded custom serialization support
2009-11-23 04:41:32 +00:00
gojomo 8251620481 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
* profile-crawler-beans.cxml*2, migrate-template-crawler-beans.cxml
    add CheckpointService as recommended bean
2009-11-20 18:35:13 +00:00
gojomo f9d56e3f6b move json dependency to commons from engine 2009-11-20 02:03:27 +00:00
gojomo 25a568fff7 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
* JobResource.java
    suppress checkpoint-selector after terminate
* Checkpoint.java
    adapt to work without direct reference to CheckpointService
* CheckpointService.java
    configure Checkpoint without making it dependent on CheckpointService
2009-11-20 01:24:57 +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 dfacba51e5 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
UI support
* JobResource.java
    enable 'checkpoint' button as appropriate
    display active recovery-checkpoint or select bos of recovery-options when available
* CrawlJob.java
    (getCheckpointService) accessor
2009-11-20 01:02:14 +00:00
gojomo 50ee78f6d2 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
* BdbFrontier.java
    implement Checkpointable; save state via JSON or BDB; restore queues-of-queues on recovery
* WorkQueueFrontier.java
    (deactivateQueue) (retireQueue) protected
* BdbUriUniqFilter.java
    implement Checkpointable; save state via JSON or BDB; restore
* WorkQueue.java
    make peekItem transient -- should not be held through checkpoint
    make retired protected
* Frontier.java, AbstractFrontier.java
    remove/update obsolete code
2009-11-20 00:59:00 +00:00
gojomo be17d5ed33 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
* CrawlController.java
    remove older checkpoint-functionality passthrough
    implement Checkpointable so behavior can vary during recovery
    only trigger annnounce of seeds on 'cold' (non-recovery) start
2009-11-20 00:51:59 +00:00
gojomo ac6b58cb0e [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
* Checkpoint.java
    (generateFrom) version more suitable for unit testing
2009-11-20 00:49:31 +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 f01ad9ada8 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
stats & logging checkpoint support
* StatisticsTracker.java
    implement Checkpointable; save small state in JSON, recycle BDB data when recovering
* CrawlerLoggerModule.java
    implement Checkpointable; rotate logs on checkpoint
* GenerationFileHandler.java
    avoid clobbering leftover logs from earlier futures via moveAside
* CrawlStatSnapshot.java
    (sameProgressAs) test for lack-of-progress
* ObjectIdentityMemCache.java, TopNSet.java
    offer deeper access to assist checkpoint/resume
2009-11-19 23:18:15 +00:00
gojomo b63c2bdc77 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
processor-related bean checkpoint support:
* ToeThread.java
    use getBeanName
2009-11-19 23:12:47 +00:00
gojomo bdf4437ca2 [HER-1546] Springify(5): Update checkpointing to work smoothly with spring-configured crawls
core checkpointing system classes:
* Checkpointable.java
    basic interface for checkpoint aware/capable beans
* Checkpoint.java
    one Checkpoint, either in progress or recovery -- a name + storage directory
* CheckpointService.java
    helper bean to enable, trigger checkpoints and recovery 
* Checkpointer.java(*2), CheckpointInputStream.java, CheckpointRecovery.java DefaultCheckpointRecovery.java, RecoverAction.java
    (deleted) no longer used
2009-11-19 22:45:07 +00:00
gojomo e42e2ed7f6 Cleanup/consolidation/expansion of *Utils classes
* IoUtils.java
    remove class that confusingly-overlaps with commons IOUtils; move remaining methods to ArchiveUtils or archive's FileUtils
* ArchiveUtils.java, FileUtils.java
    receive relocated methods; eliminated deprecated or unused methods
* JSONUtils.java
    new class to collect common JSON actions
* Iteratorable.java
    wrap Iterator as Iterable for foreach usage
* (many)
    update to use alternate utils methods
2009-11-19 22:39:53 +00:00
gojomo 300ce15a06 * EditRepresentation.java
add filename to TITLE to help identify browser tabs
2009-11-19 21:58:12 +00:00
gojomo b97319fb07 reformat 2009-11-19 21:57:05 +00:00
gojomo f9e1191144 Fix build - cleanup leak of incomplete code to prior commit 2009-11-18 20:53:41 +00:00
gojomo 56055d8236 [HER-1709] h3 - dumpPendingAtClose doesn't work
* CrawlController.java
    avoid unnecessarily early/redundant close of logs files (and checkpointer cleanup)
* WorkQueueFrontier.java
    add stop() that does close()
* BdbMultipleWorkQueues.java
    add cursor.close()
* AbstractFrontier.java, BdbFrontier.java
    use closeQuietly
2009-11-18 00:29:37 +00:00
nlevitt 148c7332c4 Merge ServerCache+ServerCacheUtil abstract superclass ServerCache
* ServerCache.java
    make abstract, implement getHostFor(UURI) and getServerFor(UURI)
* DefaultServerCache.java
    extend ServerCache, remove getHostFor(UURI) and getServerFor(UURI)
* ServerCacheUtil.java
    removed
* other classes
    change usage of ServerCacheUtil to ServerCache
2009-11-17 06:10:42 +00:00
nlevitt e57ad68230 * AbstractFrontier.java
implement ApplicationListener like it seems to want to, being that it has a
    method onApplicationEvent()
2009-11-17 04:53:11 +00:00
szznax 92f3bfe0ec check for exactly 2 args, tightened up SAXException handling by making sourceOrderXmlDom
a protected field, cleaned up unused import and whitespace.
2009-11-16 23:45:04 +00:00
gojomo 9059395617 Make Bloom size configurable without system properties
* BloomUriUniqFilter.java
    make bloom size configurable via bean properties
    change implementing class to BloomFilter64bit (given growing prevalance of 64bit JVMs and larger heaps)
* BloomUriUniqFilterTest.java
    update test for property-set sizing
* BloomFilter64bit.java
    improve comment
2009-11-16 22:42:18 +00:00