Commit Graph

307 Commits

Author SHA1 Message Date
Noah Levitt 6f4053cab7 HER-2016 FetchHTTP tries every url twice without credentials before sending credentials
* FetchHTTP.java
    configureHttp() - enable preemptive authentication parameter
    innerProcess() - do not call method.setDoAuthentication() (it's for automatic 401 handling which is not what we want)
2012-07-19 13:15:27 -07:00
Noah Levitt 9073d12f96 Revert "HER-2015 credentials cached to server never used"
This reverts commit 37a8504fda.
2012-07-19 12:36:05 -07:00
Noah Levitt 37a8504fda HER-2015 credentials cached to server never used
* FetchHTTP.java
    populateCredentials() - return true when credentials populated from server cache
2012-07-16 20:02:56 -07:00
Travis Wellman 1eb5ba704e Merge commit '787f7d' 2012-07-11 13:51:13 -07:00
Travis Wellman d0add8c186 Merge branch 'master' of github.com:internetarchive/heritrix3 2012-07-11 13:50:28 -07:00
Travis Wellman 787f7d9234 If the URI doesn't have a path, don't count segments.
* TooManyPathSegmentsDecideRule#evaluate(CrawlURI)
    return false if a path can't be obtained from the uri
2012-07-11 13:40:01 -07:00
Travis Wellman 9505edc9c3 fix for null paths
* TooManyPathSegmentsDecideRule
    Sometimes the path is null, throwing a NPE when the loop in evaluate(CrawlURI)
    is entered. In such a case, revert to previous behavior.
2012-07-10 18:01:53 -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
Travis Wellman 4b047dba64 count path segments by looking at the path
* TooManyPathSegmentsDecideRule
    evaluate(CrawlURI) previously counted slashes in the full URI.
    Now it only counts slashes in the path of the URI, meaning a URI
    with slashes in the query string will not be counted as having more
    path segments than it has in its path.
2012-07-03 13:13:50 -07:00
Travis Wellman 6626b44286 generics warnings fixes
This commit does not change any functionality, just
alters generics to reduce warnings in Eclipse.
2012-06-21 18:23:06 -07:00
Noah Levitt e1f5bc5319 HER-1987 record charset used for link extraction in warc metadata record
* WARCWriterProcessor.java
    writeMetadata() - write metadata entry charsetForLinkExtraction
2012-06-06 12:02:41 -07:00
Noah Levitt 7eabc7ef73 HER-1987 record charset used for link extraction in warc metadata record
* WARCWriterProcessor.java
    writeMetadata() - if extractors have left annotations about the encoding used to interpret content, include them in the metadata (HER-1987)
2012-06-06 11:40:58 -07:00
Noah Levitt 35378df2fa Merge branch 'master' into no-package-scope 2012-06-05 17:58:40 -07:00
Noah Levitt 3dce1e909d Change scope of most/all default-scope i.e. package-scoped class members to protected, to make heritrix more friendly to third-party extensions. (I don't think there was ever an intent to limit the scope of any of these to package-only.) 2012-06-05 17:55:41 -07:00
Travis Wellman 493e2423f6 begin removing MultiReporter
* MultiReporter.java
    deprecated
* ToePool, ToeThread, WorkQueue, WorkQueueFrontier, PrecedenceProvider, CrawlURI, FetchStats.java
    remove MultiReporter#getReports() and reportTo(String, PrintWriter)
    these are not used as MultiReporter specifies, and MultiReporter is going away anyhow
2012-06-01 17:14:41 -07:00
Noah Levitt 3bebf10674 * ScriptedDecideRule.java
getEngine() - tiny cosmetic fixups
2012-05-31 16:29:33 -07:00
Travis Wellman 392a4b3fd0 correct synchronization and threadlocal logic
Previously the whole method was synchronized even if threadlocals
were used (which are thread safe). And previously the sharedEngine
was set and returned only when it /was not/ needed ie when
getIsolateThreads() returned true.

Now getEngine does what it says it does.
2012-05-31 16:09:42 -07:00
Noah Levitt 809981ef02 * PersistProcessor.java
populatePersistEnvFromLog() - handle exception deserializing line
2012-05-10 19:00:27 -07:00
Noah Levitt 9fffa8fc53 **/pom.xml
bump version to 3.1.2-SNAPSHOT
2012-05-01 18:17:33 -07:00
Noah Levitt 79c40346fc **/pom.xml
* bump version number to 3.1.1 for release
2012-05-01 18:01:06 -07:00
Noah Levitt a7c63b8d00 * FetchHTTP.java
remove redundant nonsensical comment
2012-05-01 17:53:52 -07:00
Noah Levitt a2880c4306 HER-1990 large robots.txt problematic
* Robotstxt.java
   enforce max size of robots.txt
2012-04-20 13:57:53 -07:00
Noah Levitt 4a64c6ba59 Revert "Altered FetchStats to also keep track of the number of URIs that have"
This reverts commit 4c1740ce1e.
2012-04-18 15:53:49 -07:00
Noah Levitt 9551c774af Merge branch 'master' into http-status-deciderule 2012-04-18 15:47:24 -07:00
Noah Levitt 8e853c5f8d HER-2005 existing content length decide rule is not flexible enough
* ResponseContentLengthDecideRule.java
    new predicated decide rule that will ACCEPT or REJECT a uri if the content body is within a specified size range
2012-04-18 13:15:15 -07:00
Noah Levitt 0a4d56b638 Fix for HER-2004 SEVERE error in FetchWhois on some government domains
* FetchWhois.java
    addWhoisLinks() - handle IllegalStateException from InternetDomainName.topPrivateDomain()
2012-04-18 10:37:24 -07:00
Travis Wellman 52eef84658 note about preselector.recheckScope for use of IpAddressSetDecideRule 2012-04-12 17:34:21 -07:00
Travis Wellman 57d2f42954 formatting 2012-04-12 16:50:22 -07:00
Travis Wellman 64e9cc367b remove println, make class public 2012-04-12 16:46:16 -07:00
Travis Wellman 2a3945ff79 Merge branch 'master' of github.com:internetarchive/heritrix3 into IpAddressSetDecideRule 2012-04-02 18:17:44 -07:00
Travis Wellman f9f9e62f4c Reject or accept matching a set of IP addresses. 2012-04-02 18:16:23 -07:00
Noah Levitt 335b32aecc * ExtractorHTML.java
some fixup on RELEVANT_TAG_EXTRACTOR javadoc comment
2012-03-20 15:14:14 -07:00
Adam Miller a108795d50 HER-1998 - Adding comments, adjusting test case to prevent subclasses from failing new tests 2012-03-19 18:19:00 -07:00
Adam Miller 1a333fbd35 HER-1998 - ExtractorHTML modified to parse html inside conditional comments. Still ignores normal comments 2012-03-16 14:36:15 -07:00
Noah Levitt e7d75cbb5a * AbstractPersistProcessor.java, PersistProcessor.java, PersistStoreProcessor.java
refactor some common persist processor code into new class AbstractPersistProcessor
2012-03-06 16:20:58 -08:00
Noah Levitt cfac7ead91 Fix for HER-1985 H3: SurtPrefixDecideRule forgets learned/seed-derived/seed-directive SURT prefixes in checkpoint-resume
* SurtPrefixedDecideRule.java
    make class implement Checkpointable, save surt prefixes to json on checkpoint and load them on recover
* profile-crawler-beans.cxml
    make main SurtPrefixedDecideRule a top-level bean so that it can be checkpointed
* Checkpoint.java, CheckpointService.java
    add some FINE level logging during checkpointing and recovery
2012-02-09 10:05:07 -08:00
Noah Levitt 803f9ca979 HER-1984 save script state - implement by adding a map to the application context for arbitrary use, and make sure the app context is available in all scripting environments
* PathSharingContext.java
    new member variable ConcurrentHashMap data and accessor getData()
* ScriptedProcessor.java, ScriptedDecideRule.java
    make appCtx available to scripts; also remove unused member sharedMap
* ActionDirectory.java
    formatting fix
2012-01-19 13:31:57 -08:00
Noah Levitt 55ec01c4e4 Fix for HER-1983 mangled dns records in w/arcs
* FetchDNS.java
    recordDNS() - use local variable for dummy read buffer, instead of member variable that was shared among threads, since RecordingInputStream.read() used the passed buffer as a work area
2012-01-11 14:38:57 -08:00
gojomo d3ea17baf5 [HER-1976] query-portion ignored when checking against robots.txt rules
(using only path)
(RobotsPolicyTest) added for case that failed pre-fix
(RobotsTxtTest) added case similar to problem (but was already OK at
RobotsTxt level)
(RobotsPolicy, *RobotsPolicy) rename method to reflect new behavior
2012-01-05 23:37:00 -08:00
gojomo 4829160c84 [HER-1981] H3: overlay setting of alternate queue-precedence (via
BaseQueuePrecedencePolicy.basePrecedence) doesn't stick
(CrawlURI) don't null overlayNames in processingCleanup
(WorkQueueFrontier) move queue precedence recalc to only in handleQueue,
not all (post-wake) reenqueues
2012-01-05 23:01:54 -08:00
Gordon Mohr 4ffb6865e1 [HER-1976] H3: query-portion ignored when checking against robots.txt rules (using only path)
* RobotsPolicy.java: use UURI.getPathQuery -- like H1 does
2011-12-22 19:04:19 -08:00
Christopher Miles 4c1740ce1e Altered FetchStats to also keep track of the number of URIs that have
an HTTP status between 200 and 299.

Altered the QuotaEnforcer to enforce quotas on the number of URIs that
have an HTTP status between 200 and 299.

Removed confusingly named variables (SUCCESS, SUCCESS_KB, RESPONSES,
RESPONSES_KB) and replaced their references.
2011-11-17 12:34:05 -05:00
Christopher Miles 86cf3e1fcd Added two new decide rules that make decisions against the HTTP status code for the provided URI. This is likely most useful when you want to keep the size of the stored crawled data down be rejecting 404s, etc. 2011-11-16 14:53:11 -05:00
Noah Levitt dff143b301 HER-1964 record whois server ip address in warc
* FetchWhois.java
    fetch() - record server ip address in CrawlURI attributes list
* CoreAttributeConstants.java
    new string constant A_WHOIS_SERVER_IP, key for whois server ip address CrawlURI attribute
* WARCWriterProcessor.java
    writeWhoisRecords() - include warc header WARC-IP-Address
2011-11-01 16:57:22 -07:00
Noah Levitt 450a4c44c4 * CrawlURI.java markPrerequisite() - call setPrerequisite(true) on the prerequisite CrawlURI 2011-10-28 10:03:14 -07:00
nlevitt 5735839252 Post 3.1.0
* **/pom.xml
   switch version to "3.1.1-SNAPSHOT"
2011-10-21 19:00:37 +00:00
nlevitt 8c99fc947c Prep for 3.1.0 release
* **/pom.xml
    bump version-id to "3.1.0"
* README.txt
    refer to exactly 3.1.0 release notes
2011-10-21 17:08:04 +00:00
nlevitt b4e6f43052 Unset script engine variables after scripts complete, allowing memory to be freed up sooner - see also r7252
* ScriptResource.java, ActionDirectory.java, ScriptedDecideRule.java
2011-10-06 18:01:01 +00:00
nlevitt b898d55cea Certain invalid "Crawl-delay" values, e.g. "/", in robots.txt cause split() to return empty string, resulting in ArrayIndexOutOfBoundsException - reported by John Lekashman
* Robotstxt.java
    initializeFromReader() - catch ArrayIndexOutOfBoundsException and ignore -- matches existing handling of other invalid crawl-delay values (catch NumberFormatException and ignore)
2011-10-06 17:20:13 +00:00
nlevitt 747fbc0a0f Fix for HER-1954 bdb closed at crawl finish instead of teardown -- refactor crawl finish and teardown
* PathSharingContext.java
    start(), doStart(), stop(), doStop() - remove these overloaded methods, because the spring bug they were working around seems to be fixed, not seeing any problems with cyclical dependencies - might be this one https://jira.springsource.org/browse/SPR-7266
    doClose() - remove because superclass version seems to work fine (this method generally wasn't being called anyway, though it would be now with other changes in this checkin)
* CrawlJob.java
    refactor teardown to call close() on the ApplicationContext, which calls destroy() on any beans that implement DisposableBean - this is now the way to have beans do stuff at teardown
* CrawlController.java
    send FINISHED crawl state event after calling appCtx.stop() so that isFinished() can indicate ready-ness for teardown
* BdbModule.java
    move close() to teardown, i.e. implementation of DisposableBean.destroy(); remove shutdown hook and rely on teardown; related tweaks
* WorkQueueFrontier.java, CrawlerLoggerModule.java, BdbUriUniqFilter.java
    move close() to teardown
* CrawlMapper.java, AbstractFrontier.java, PreloadedUriPrecedencePolicy.java, FetchWhois.java, FetchHTTP.java, PersistLogProcessor.java, WriterPoolProcessor.java
    add comments about cleanup that maybe should wait until teardown
* UriUniqFilter.java
    remove incorrect(?) comment
2011-09-29 00:39:55 +00:00