Commit Graph

173 Commits

Author SHA1 Message Date
gojomo 790469280e [HER-1814] remove dependency on apache commons-pool/GenericObjectPool
* WriterPoolMember.java
    fix ops broken by removal of checkSize at preWriteRecordTasks -- still create if out == null
2010-08-26 21:19:56 +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 03778ff943 [HER-1727] (W)ARC filename uniqueness guarantees: adminport option, process_id option(?), JVM-global-repeat-suppression
* WriterPoolMember.java
    use '~' rather than '@' and '#' as pid~hostname~port separators, for less risk in shell scripts and URLs
2010-08-23 22:17:39 +00:00
gojomo e3023218e1 null check; fix broken test 2010-08-20 04:08:07 +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
gojomo 5f76c7ef56 [HER-1800] H3: Incomplete checkpoint listed in combo box
* CheckpointService.java
    use static method on Checkpoint for validity check
* Checkpoint.java 
    throw early-startup exception if attempting resumption of invalid checkpoint
2010-07-13 02:59:47 +00:00
gojomo 7d4ed491be * ReadSourceEditor.java
PropertyEditor to ease inline specification (as String/ConfigString) anywhere a ReadSource is expected
2010-07-09 23:17:06 +00:00
gojomo 274e522f85 [HER-1793] BOM in seeds.txt confuses heritrix
* RegexpLineIterator.java
    ignore \ufeff along with leading whitespace
2010-07-02 17:47:41 +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 4875135dc9 [HER-1762] H3 performance tuning
* KeyedProperties.java
    avoid allocation hotspot shown by profiling (creating iterator for empty collection)
2010-06-18 02:37:42 +00:00
gojomo 4c1a4f2e12 remove unneeded import 2010-06-15 21:34:57 +00:00
gojomo 3c8e72a20e * BloomFilterTest.java
disable by renaming ('xest') those tests taking >15mins each
2010-06-15 21:33:34 +00:00
gojomo 6be649b286 [HER-1783] BloomFilter64bit bit-length bug prevents full bitfield from being used; premature saturation
* BloomFilter64bit.java
    include the split-to-subarrays (for larger bitfields) and round-up-to-power-of-2 (for performance) options previously in largely-redundant classes
    fit a number of problems with int/long overflow and bitwise ops
    add methods for reporting/testing
* BloomFilter.java
    add methods for reporting/testing
* BloomFilterTest.java, BloomFilter64bitTest.java
    more extensive tests, including two lengthy tests of default/oversized blooms usually disabled by renaming
* BloomFilter32bit.java, BloomFilter32bitSplit.java, BloomFilter32bp2.java, BloomFilter32bp2Split.java
    deleted as buggy or redundant
* BenchmarkBlooms.java
    move to test source dir
* BloomUriUniqFilter.java
    change to accept filter instance (rather than parameters) for added configuration flexibility
    fix comments
* BloomUriUniqFilterTest.java
    supply filter not paramters
2010-06-15 21:30:34 +00:00
gojomo f9a3c2344c * BloomFilterTest.java
explicit deferenced bloom instance to avoid OOME
2010-06-08 03:38:56 +00:00
gojomo 4e1b47746c * commons/pom.xml
increase heap for testing to 1024m to accomodate big bloom bitfield tests
2010-06-08 03:28:51 +00:00
gojomo e9a11e56c6 HER-1783 BloomFilter64bit bit-length bug prevents full bitfield from being used; premature saturation
* BloomFilter64bit.java
    fix long arithmetic calculating bit-length m in constructor
    slight optimization of add()
* BloomFilterTest.java
    abstract superclass for bloom impl class tests
* BloomFilter64bitTest.java
    sanity check that set bits, after a handful of adds into default-sized filter, occupy top and bottom 20% of range (which would have caught this bug earlier)
2010-06-08 02:39:35 +00:00
szznax 14b8649aa9 minor cleanup/clarification on review 2010-04-26 21:49:41 +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 9fc5e42cfe Fix failing test
* InMemoryReplayCharSequence.java
    ensure redecode after problem restarts at right position
2010-04-23 22:57:50 +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 9fd648f3ef HER-1467 Allow periodic checkpointing and checkpoint-copy-logs to be set/unset during crawl
* CheckpointService.java
    reorganize so that checkpoint timedTask is reset whenever interval is reset on a running crawl
* CheckpointSuccessEvent.java, CrawlJob.java
    report successes as new kind of ApplicationEvent; propagagte to job log
* BdbModule.java
    remove obsolete unconsulted checkpointCopyLogs setting
2010-04-23 00:15:44 +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 72fb1c55bd Move TLD list to resource file for easier drop-in updating
* ArchiveUtils.java
    read TLDs from tlds-alpha-by-domain.txt
* ArchiveUtilsTest.java
    verify TLDs read
* tlds-alpha-by-domain.txt
    from http://data.iana.org/TLD/tlds-alpha-by-domain.txt
2010-04-22 01:05:23 +00:00
gojomo 9e12e4abe5 test/deprecation cleanup
* CachedBdbMap.java
   @deprecated
* BdbModule.java
   note (unused) 'CBM' option is deprecated
* ObjectIdentityBdbCache.java
   tighten logging to FINE
* ObjectIdentityBdbCacheTest.java
   fix test that was only trying to log, rather than fail, problems
2010-04-13 02:15:53 +00:00
gojomo 1698412130 HER-1450 Reading at EOF using read(byte[]) causes position pointer to decrement.
* ARCWriterTest.java
    one more test to ensure the problem with read(void) was exercised/fixed
2010-04-09 21:25:26 +00:00
szznax cc6fb841d9 part of fix for [HER-1450] Reading at EOF using read(byte[]) causes position pointer to decrement.
* ArchiveRecord.java
    do not decrement position after EOR, port from H1
* ARCWriterTest.java
    added testArchiveRecordEORConsistent(), testArchiveRecordMarkSupport()
        port from H1
2010-04-09 18:25:16 +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
szznax af85fed7f4 part of fix for HER-1748 Arc2Warc should generally write WARC "response" records for ARC HTTP responses
* Arc2Warc.java
    reverted writing ARC namedFields, deferred for further analysis as part of HER-1750
2010-03-12 23:44:07 +00:00
szznax cc8ea6494a changed namedField "ARC-Compressed-Offset" to "ARC-Gzip-Offset" for even more clarity 2010-03-11 15:59:10 +00:00
szznax 4802e5093e part of fix for HER-1748 Arc2Warc should generally write WARC "response" records for ARC HTTP responses
* Arc2Warc.java
    changed namedField "ARC-Offset" to "ARC-Compressed-Offset" for clarity
2010-03-11 01:45:49 +00:00
szznax 8a567c9bc0 part of fix for HER-1748 Arc2Warc should generally write WARC "response" records for ARC HTTP responses
* Arc2Warc.java
    removed unnecessary URISyntaxException import
    moved ARC named fields outside of check for IP in header field
2010-03-10 00:33:38 +00:00
szznax 65f962dc25 whitespace corrections 2010-03-08 18:07:30 +00:00
szznax 65d552ce5c fix for HER-1748 Arc2Warc should generally write WARC "response" records for ARC HTTP responses
* Arc2Warc.java
    when HTTP response, write response record rather than resource
    enable reconstruction of ARC from WARC via namedFields
* ARCRecord.java
    added headerString and accessor to save verbatim ARC header string
2010-03-08 17:43:42 +00:00
szznax 3e5cf29315 nit correction in javadoc 2010-03-08 17:35:47 +00:00
nlevitt 86268def97 * LongToIntConsistentHash.java
Skip unnecessary conversion from CharSequence to String
2010-02-25 18:19:46 +00:00
gojomo 1a95e530e8 Clean-up where assumption of serializability no longer appropriate 2010-01-26 01:25:47 +00:00
gojomo 248f720cab Make Recorder facility usable independent of special crawler threads
* Recorder.java
    store reusable per-thread Recorder instance in Recorder static thread-local
* ToeThread.java
    setup reusable instance into Recorder
* RecorderMarker.java
    deleted -- unnecessary
2010-01-26 01:21:59 +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 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
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 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 5d843d46c1 * CachedBdbMap.java
remove unnecessary/build-breaking ServerCache import
2009-11-23 09:36:56 +00:00
gojomo faa8e899db * CachedBdbMap.java
remove unnecessary/build-breaking CrawlController import
2009-11-23 09:26:08 +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