Commit Graph
61 Commits
Author SHA1 Message Date
Noah Levitt 3a429ffa44 Merge branch 'master' into hc43
Conflicts:
	commons/pom.xml
	commons/src/main/java/org/archive/io/RecordingInputStream.java
	commons/src/main/java/org/archive/io/RecordingOutputStream.java
	commons/src/main/java/org/archive/io/ReplayInputStream.java
	dist/pom.xml
	engine/pom.xml
	modules/pom.xml
	modules/src/main/java/org/archive/modules/extractor/ExtractorHTTP.java
	modules/src/main/java/org/archive/modules/recrawl/FetchHistoryProcessor.java
	pom.xml
2014-01-10 17:52:03 -08:00
Noah Levitt a06c141740 rename BdbUriUniqFilter.forgetSchemeHost() to forgetAllSchemeAuthorityMatching(), improve performance 2013-08-21 11:31:05 -07:00
Noah Levitt 750a688670 Merge branch 'master' into hc43
Conflicts:
	commons/src/main/java/org/apache/commons/httpclient/HttpParser.java
	engine/pom.xml
	modules/src/main/java/org/archive/modules/CrawlURI.java
	modules/src/main/java/org/archive/modules/deciderules/MatchesStatusCodeDecideRule.java
	modules/src/main/java/org/archive/modules/deciderules/NotMatchesStatusCodeDecideRule.java
	modules/src/main/java/org/archive/modules/fetcher/FetchHTTP.java
2013-08-08 21:14:11 -07:00
Noah Levitt f4f3b9be38 add logging to BdbUriUniqFilter.forgetSchemeHost(), clean up some javadocs 2013-07-26 17:50:36 -07:00
Noah Levitt b9726c8d4f new method BdbUriUniqFilter.forgetSchemeHost(String schemeHost), and unit test 2013-07-25 18:51:26 -07:00
Kenji Nagahashi 358afd4486 revised scripting console xml response fix based on comments.
removed scripting console actions from ScriptModel into ScriptingConsole
class (resurrection of ScriptExec).
added basic ScriptingConsoleTest.
2013-06-10 14:17:27 -07:00
Kenji Nagahashi 3a54600a79 ADD unit test for XmlMarshaller 2013-05-29 12:03:49 -07:00
Noah Levitt 25234898ef Somewhat redundant form auth integration test restored, passes 2012-12-30 22:35:28 -08:00
Noah Levitt 4496c5d755 * FetchHTTPTest.java
move to modules/src/test
    testFormAuth() - remove, there is FormAuthSelfTest.java, and this was the test that would fail in modules/
    testHttpBindAddress() - incorporate ed65493db0 - alternate testing of multiple local binds more likely to work more places
2012-11-30 17:57:36 -08:00
Noah Levitt 7965a27b1d Fix infinite loop bug on server returning no response
* RecordingSocketInputBuffer.java
    readLine(CharArrayBuffer) - return -1 (not 0) on end of stream
* RecordingHttpClient.java
    setHttpRequestRetryHandler() - never retry (may want to reevaluate later, old fetcher did retry sometimes)
* FetchHTTPTest.java
    testNoResponse()
2012-09-13 19:10:11 -07:00
Noah Levitt 9699d6a6ed get rid of AbstractFetchHTTP 2012-09-08 01:17:32 -07:00
Noah Levitt 33df8faaf0 remove LegacyFetchHTTP and its classes 2012-09-08 00:49:30 -07:00
Noah Levitt 71761a72a7 rename FetchHTTP2 to FetchHTTP 2012-09-08 00:28:06 -07:00
Noah Levitt 917986454b rename FetchHTTP to LegacyFetchHTTP 2012-09-08 00:25:14 -07:00
Noah Levitt 24e813c858 test chunked transfer encoding 2012-09-07 13:28:41 -07:00
Noah Levitt 09f0e53119 testHttp11 2012-09-07 11:32:38 -07:00
Noah Levitt 9a0191a84c ssl trust level support for FetchHTTP2! another thing that doesn't even work properly in old FetchHTTP 2012-09-07 02:47:54 -07:00
Noah Levitt 0764096eb0 skip slow tests for old FetchHTTP for now 2012-09-07 02:42:13 -07:00
Noah Levitt f2f0ca59f6 embedded jetty https server 2012-09-06 19:28:07 -07:00
Noah Levitt 948d641b14 socket/connection timeout 2012-09-06 12:39:44 -07:00
Noah Levitt d11338d620 testFetchTimeout 2012-09-05 19:24:50 -07:00
Noah Levitt baaf4f8092 testShouldFetchBodyRule 2012-09-04 13:25:51 -07:00
Noah Levitt ca606588ae test sendIfNoneMatch (etag) 2012-09-02 15:25:56 -07:00
Noah Levitt c03273230b sendIfModifiedSince 2012-09-02 13:00:01 -07:00
Noah Levitt 1fe4781cf5 axLengthBytes, sendRange 2012-09-02 01:37:00 -07:00
Noah Levitt 2d8687e55c maxFetchKBSec 2012-09-01 23:05:50 -07:00
Noah Levitt cdd95cbb1f move FetchHTTP*Test* to engine/ subproject because testFormAuth() makes use of PreconditionEnforcer, part of engine/, and we want to keep that test 2012-08-30 09:55:20 -07:00
Travis Wellman c1a0525107 suppress unused warnings for serialVersionUid
Toward the goal of having Eclipse warnings be useful to look at, suppressing
unused warnings for serialVersionUid will significantly reduce clutter.
2012-07-10 14:12:33 -07:00
nlevitt f20b3eee30 Fix HER-1935 Many calls to File.mkdirs() and other file/dir methods don't check the return value. Also fix bug where pointless empty directories were created in scratch dir.
* BasicProfileTest.java, SelfTestBase.java, CrawlControllerTest.java, PrecedenceLoader.java, MigrateH1to3Tool.java, CrawlerLoggerModule.java, StatisticsTracker.java, CheckpointUtils.java, BdbUriUniqFilter.java, ARCWriterProcessorTest.java, WARCWriterProcessorTest.java, PersistProcessor.java, WriterPoolProcessor.java, PrefixFinderTest.java, StoredQueueTest.java, FileUtilsTest.java, ObjectIdentityBdbManualCacheTest.java, ObjectIdentityBdbCacheTest.java, ObjectPlusFilesOutputStream.java, TestUtils.java, TmpDirTestCase.java, Engine.java
    Replace calls to File.mkdirs() with FileUtils.ensureWriteableDirectory(dir). In these cases the calls were either already in a spot where the possible IOException would be handled appropriately, or the line was trivially moved into such a block.
* ActionDirectory.java, Engine.java
    replace calls to File.mkdirs() with FileUtils.ensureWriteableDirectory(dir), and throw IllegalStateException on failure
* BdbModule.java
    setup() - replace call to File.mkdirs() with FileUtils.ensureWriteableDirectory(dir) and add "throws IOException" - conveniently the place where this method is called was already in a try block that catches IOException
* Checkpoint.java
    generateFrom() - replace call to File.mkdirs() with FileUtils.ensureWriteableDirectory(dir) and add "throws IOException"
* CheckpointService.java
    move call to Checkpoint.generateFrom() inside existing try block since it now can throw IOException
* Recorder.java
    ensure(File) - replace call to File.mkdirs() with FileUtils.ensureWriteableDirectory(dir), and throw IllegalStateException on failure
    new Recorder(File,String,int,int) - call ensure() on the correct object, the containing directory; and remove redundant call to ensure()
2011-09-12 20:12:10 +00:00
nlevitt d57b7751ae * SelfTestBase.java
verifyProgressStatistics() - expect "RUNNING" instead of "RESUMED" per r7180
2011-06-15 18:10:37 +00:00
nlevitt 6d6c1059a5 Use Recorder.getContentReplayCharSequence() instead of deprecated
getReplayCharSequence()
2011-04-20 19:38:12 +00:00
gojomo c2027b7a30 * SimpleSelfTest
more useful assertEquals
2011-01-26 03:11:17 +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 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 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 8f28d493a2 [HER-1827] Have Frontier report include top X longest queues
* Histotable.java
    expose static method useful for frequency-reporting
* TopNSet.java, TopNSet.java
    improve handling of case where updates may decrease frequency counts
    add convenience methods for common needs
* WorkQueueFrontier.java
    replace single longestActiveQueue with largestQueues TopNSet, of configurable size
    make max-queues-to-report-per-category configurable
2010-09-28 22:12:28 +00:00
gojomo 2f78980e5d [HER-1814] remove dependency on apache commons-pool/GenericObjectPool
* SelfTestBase.java
    don't try to UURIify 'fieldesc:' ad-hoc URIs
2010-08-26 21:56:50 +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 5f83fe75a2 HER-1010 crawl favicon.ico
* (self tests)
    correct expectations to now include /favicon.ico
2010-06-03 00:31:32 +00:00
gojomo b639873dae Fix broken test
* Engine.java
    tolerate (with return-false-forfailure rather than NPE) non-job directories
* EngineTest.java
    use empty temp job directory rather than (possibly full-of-junk) general junit-tests directory
2010-04-27 00:44:36 +00:00
gojomo 1a95e530e8 Clean-up where assumption of serializability no longer appropriate 2010-01-26 01:25:47 +00:00
szznax bf2eaef6e2 Part of fix for [HER-1725] on engine page, 'create new job' form gives NPE
* Engine.java
  made protected getProfileCxmlResource() for clear testability
* EngineTest.java
  added testGetProfileCxmlResource()
2009-12-11 00:47:06 +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 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
gojomo 0497efbb32 [HER-1561] update license to Apache License 2.0
* (many)
    update license boilerplate
* (few)
    delete no-longer used classes
2009-11-10 21:03:27 +00:00
gojomo dbc1c1b411 * KeyWordProcessor.java
update shouldProcess() to be based on via CrawlURI's type
2009-10-06 02:28:47 +00:00
gojomo 4ce8aef47a Remove obsolete test class 2009-10-06 01:40:22 +00:00