Commit Graph
607 Commits
Author SHA1 Message Date
nlevitt b79308b2e0 Part of HER-1875 - socket timeout for whois fetcher
* FetchWhois.java
2011-04-05 01:22:01 +00:00
nlevitt 81cda7be59 HER-1875 followup - override SocketFactory to support connect timeout for ftp
data connection
2011-04-05 01:21:09 +00:00
nlevitt 653f24e713 Avoid exception - "org.springframework.beans.NotWritablePropertyException:
Invalid property 'timeoutSeconds' of bean class
[org.archive.modules.fetcher.FetchFTP]: Bean property 'timeoutSeconds' is not
writable or has an invalid setter method. Does the parameter type of the setter
match the return type of the getter?"
* FetchFTP.java
    change setTimeoutSeconds(Integer) to setTimeoutSeconds(int)
2011-04-04 20:10:54 +00:00
nlevitt 8e7b9a5fdf Fix HER-1875 FetchFTP needs socket timeout
* FetchFTP.java
    setSoTimeoutMs(), getSoTimeoutMs()
    (init) - set default value of 20000 ms, same as FetchHTTP
    fetch() - set various timeouts on FTPClient - effectively sets connect
    timeout and socket timeout on control connection, and socket timeout on
    data connection (notably, does not set connect timeout on data connection
    w/ current commons-net)
2011-04-04 19:50:56 +00:00
gojomo 1395854f9a [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* OpenJDK7GZIPInputStream.java, OpenJDK7InflatedInputStream.java
    backport the working GZIP implementation from OpenJDK7, with minimal 
    renames/imports/private-to-protected changes to enable member-at-a-time reading
* GZIPMembersInputStream
    base on OpenJDK7 implementation to avoid pre- & post-6u23 codepaths, and 6u23/24 readHeader bug
    override readTrailer to set member-end; update comment to reflect end-uncertainty without EOF-per-member-mode
* GZIPMembersInputStreamTest, ARCWriterTest
    test tweaks
2011-03-30 02:42:26 +00:00
gojomo e6e415b9d9 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* OpenJDK7GZIPInputStream.java, OpenJDK7InflatedInputStream.java
    backport the working GZIP implementation from OpenJDK7, with minimal 
    renames/imports/private-to-protected changes to enable member-at-a-time reading
* GZIPMembersInputStream
    base on OpenJDK7 implementation to avoid pre- & post-6u23 codepaths, and 6u23/24 readHeader bug
    override readTrailer to set member-end; update comment to reflect end-uncertainty without EOF-per-member-mode
* GZIPMembersInputStreamTest, ARCWriterTest
    test tweaks
2011-03-30 02:42:04 +00:00
nlevitt e60fd8b0e1 * XmlMarshaller.java
marshalDocument() - SAXException can wrap other exceptions, e.g.
    EOFException when tcp connection is broken; thus, in case of IOException,
    rather than throwing a RuntimeException, re-throw the wrapped IOException
    (unfortunately in that case we still get a massive stack trace in the log,
    but at least it comes from the appropriate spot and is not too misleading)
2011-03-02 01:34:19 +00:00
nlevitt 013b5e394d Different fix for HER-1872: additional property preloadSourceUrl. Use either
that or preloadSource (a filesystem path), rather than try to handle both
possibilities with one string.
* PersistLoadProcessor.java
* PersistProcessor.java
2011-03-02 01:24:28 +00:00
nlevitt 17b12ca19b * HostsReport.java
url-encode hosts (other than "dns:") in host report, in case of hostname
    containing whitespace or other unusual characters, which can happen
2011-03-01 23:43:58 +00:00
gojomo 3fc3d324e8 * ArchiveReaderFactory
avoid misinterpreting a "c:" local path as a URI scheme
2011-02-26 01:04:26 +00:00
nlevitt d97d4aa8cb Fix HER-1872 PersistLoadProcessor preloadSource does not support url
(regression from h1)
* PersistLoadProcessor.java
    change preloadSource from ConfigFile to String, allowing the logic in
    PersistProcessor.copyPersistSourceToHistoryMap() to decide how to load it
2011-02-26 00:59:35 +00:00
gojomo 2f9a8b860d * GZIPMembersInputStream
ensure mark()ing more frequently, when reset to before current position won't be needed
* ArchiveReaderFactory
    avoid misinterpreting a "c:" local path as a URI scheme
2011-02-26 00:59:10 +00:00
gojomo fe5363feb0 * GzipMembersInputStreamTest
test with 6 small members
2011-02-24 22:13:46 +00:00
gojomo 9fef4f1f26 * ArchiveReader
better logging of caught/recovery-attempted IOException
* GZIPMemberInputStream
    handling of previously-unrecognized case in pre-JDK6u23: attempt at read() exhausts inflater with no new bytes available (previous nonzero-length read had not indicated inflater finished)
2011-02-24 19:22:50 +00:00
gojomo bb07080e02 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* ArchiveReaderFactoryTest
    test cases for generic reader-get methods -- one of which had obsolete STREAM_ALL=-1 problem
2011-02-23 01:09:05 +00:00
gojomo c6a94c2264 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* ArchiveReaderFactory
    discard obsolete -1 flag value creating problems with usual uses
2011-02-23 00:24:47 +00:00
nlevitt f03b1ac689 * URIAuthorityBasedQueueAssignmentPolicy.java
rename "whois" queue to "whois..." to avoid conflicting with queue for
    theoretical hostname "whois"
2011-02-19 02:10:39 +00:00
nlevitt b9c408cb07 Change form of generic serverless whois url to e.g. whois:archive.org
* FetchWhois.java
* UURIFactory.java
2011-02-19 02:00:18 +00:00
gojomo a6f3b7db25 * ARCWriterTest
test inspired by Erik Hetzner's HER-1865 test code
2011-02-19 00:35:09 +00:00
nlevitt 368ff65286 * FetchWhois.java
add license preamble
2011-02-17 22:52:37 +00:00
nlevitt 4991b295bc HER-1645 whois fetcher
* URIAuthorityBasedQueueAssignmentPolicy.java
    whois urls all go in special "whois" queue
* PreconditionEnforcer.java, CrawlURI.java
    move markPrerequisite() method from PreconditionEnforcer to CrawlURI
* profile-crawler-beans.cxml
    commented-out whois fetcher clause
* FetchStatusCodes.java
    new status codes for whois
* ServerCache.java
    getHostFor() - return "whois:" for whois urls, following dns: convention
* UURIFactory.java
    ugly hack for whois urls
* SchemeNotInSetDecideRule.java
    add whois to list of supported schemes
* WriterPoolProcessor.java
    shouldWrite() - we should write successful whois fetches
* WARCWriterProcessor.java
    write whois records
* FetchWhois.java
    the fetcher
2011-02-17 22:33:28 +00:00
gojomo 885a25c90c Robustify based on JUnit issues on Windows
* ArchiveReader
    improve warning message
* WriterPoolMember
    attempt pre-delete of target filename, warn on failure, for better odds on some filesystems
* ARCWriterTest, WARCWriterTest
    ensure timely close of readers/writers in case filenames are reused
    restore originally-intended unique target names
2011-02-17 01:21:48 +00:00
gojomo 9d588b9978 implement Closeable 2011-02-17 01:17:35 +00:00
gojomo b86f0afc83 * TopNSet
resolve strange type complaint in my Windows Eclipse JDK6u24 setup
2011-02-17 01:14:32 +00:00
gojomo 61dc661f47 * TopNSet
resolve strange type complaint in my Windows Eclipse JDK6u24 setup
2011-02-17 01:13:37 +00:00
gojomo 548114dbde [HER-1864] cookies are being set and sent back on TLDs/public-suffixes (like '.com') (sometimes called 'supercookies')
* CookieSpecBase
    use Guava InternetDomainName public-suffixes to both (1) prevent storing cookie on public-suffix; (2) prevent looking-up cookies for public-suffixes
* BdbCookieStorage
    correct checkpoint/relaunch behavior: don't reuse persisted cookies on normal relaunches; do reuse on resume-from-checkpoint
2011-02-16 01:18:57 +00:00
gojomo 5de965590c Update Guava library to r08
* .classpath, commons/pom.xml
    update reference
* ObjectIdentityBdbManualCache
    use new maximumSize() option on dirtyItems map
2011-02-16 01:15:13 +00:00
gojomo 9b78770027 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* GZIPMembersInputStream
    new workaround class that offers choice of pre/post JDK6u23 behavior and new accessors for finding member boundary offsets
* GZIPMembersInputStreamTest
    test for above
* ArchiveUtils, ARCWriter
    move static compress utilities to ArchiveUtils
* ArchiveReader, (W)ARCReaderFactory, (W)ARCWriterTest
    adapt to use GZIPMembersInputStream
* GzippedInputStream(Test)
    deleted
2011-02-16 01:12:25 +00:00
gojomo 9e53f8be7c [HER-1867] make H3 ssl adhoc self-signed certificate valid for longer (appears to expire after 90 days)
* Heritrix
    pass '-validity 3650' to KeyTool
2011-02-14 22:07:10 +00:00
nlevitt 9468cb0c1f Report total bytes, as well as breakdown, in xml version of job page, to match
html.
* CrawlJob.java
    sizeTotalsReportData() - add "total" (bytes) and "total-count" (urls) to map
* CrawledBytesHistotable.java
    new method getTotalUrls() to complement getTotalBytes()
2011-02-09 01:17:26 +00:00
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 40f7debeaa [HER-1846] IOException due to disk full situation can cause frontier lock-up
* WARCWriterProcessor
    move checkSize into block protected by catch/finally cleanup of errors
* WARCWriterProcessorTest
    test to simulate record-write-failure and verify does not cause pool lockup
* WARCWriterTest, WriterPoolMember
    comment and warnings cleanup
2011-01-28 03:02:17 +00:00
nlevitt a6fd015f6b * commons/pom.xml
fix inconsistent line endings (remove ^M's) - a trivial change to poke
    continuum which is truncating this file
2011-01-28 02:04:55 +00:00
gojomo c1a99a8e35 [HER-1861] Add 'first-named' robots policy, which considers rules for more than one user-agent, in order
* Robotstxt, RobotstxtTest
    treat wildcardRules specially, so that it is possible to ask for only explicitly-named matches
* MostFavoredRobotsPolicy
    improve comment, change masquerade default to true
* FirstNamedRobotsPolicy, FirstNamedRobotsPolicyTest
    policy to consider alternate user-agents in order, using the first that has any explicit (non-wildcard) rules declared (or failing that, the original default user-agent)
2011-01-28 00:48:25 +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 a3d4dc5ac2 [HER-1834] log-bloat, memory problems when hopsPath grows endlessly with no max-hops limit set
* TooManyHopsDecideRule
    remove inadvertent reversal of sense of comparison, making default scope reject almost everything (and breaking most self-tests)
2011-01-26 03:08:32 +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 d2f28f051c [HER-1834] log-bloat, memory problems when hopsPath grows endlessly with no max-hops limit set
* CrawlURI
    add getHopCount() for total (including tallied overflow) hop count
* TooManyHopsDecideRule
    base decision on getHopCount()
2011-01-19 07:37:43 +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 f0f8aeb9b9 * WARCWriter
remove that pesky reference to a 'modules' class (usu. available in dev setup, but not in ordered formal builds)
2011-01-19 01:25:42 +00:00
gojomo 57edfde618 [HER-1859] ExtractorJS improper handling of Javascript string literal escapes
* ExtractorJS
    apply JS literal string deescaping before interpretation as link
* ExtractorJSTest
    3 basic tests, including one for this issue
* Link
    provide logging and fallback for case where via may be null; risk identified in creation of test cases could present again if a '.js' file is ever provided as a (via-less) seed
2011-01-18 23:34:35 +00:00
nlevitt 0af0d3cc6a * WARCWriterProcessor.java
addStats() - use putIfAbsent() to avoid race conditions; move
    creation of stats map to constructor to avoid another race condition
* WARCWriter.java
    switch back to thread-unsafe data structures for stats since object is used
    in one thread at a time according to javadoc
2011-01-18 04:02: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 799e0d9ff8 Remove errant import that eclipse added to satisfy a javadoc reference, but that breaks build 2011-01-17 23:06:11 +00:00
nlevitt cf597b2796 Fix fix on commented out scope.logToFile - default value is false 2011-01-17 22:53:43 +00:00