Commit Graph
1947 Commits
Author SHA1 Message Date
Andy Jackson d0a146bc66 Clarification about APIs. 2019-02-05 10:28:18 +00:00
Andrew Jackson 021aeeaa20 Swapped original and link to make maintenance simpler. 2019-02-05 10:25:54 +00:00
Andrew Jackson b08db899dd Tidy up markup and links. 2019-02-05 10:23:01 +00:00
Barbara Miller e8aba660d8 Merge pull request #227 from nlevitt/dont-checkpoint-unstarted
do not checkpoint if crawl job has not started
2019-01-04 15:53:43 -08:00
Noah Levitt 01153b0311 do not checkpoint if crawl job has not started
Sometimes our crawl jobs get stuck in the NEW state (due to hbase
problems). But the checkpoint service has started and sees fit to
checkpoint every five minutes. Evidently, at this stage the seeds have
not been queued yet, the frontier is empty. Thus, if we try to resume
from one of these checkpoints, the crawl has an empty frontier and ends
immediately.

The fix is to avoid checkpointing in this NEW state before crawling has
really started.
2019-01-04 15:40:16 -08:00
Barbara Miller a40c466520 Merge pull request #226 from nlevitt/scope-log-horror
namespace scope log logger to crawl job
2019-01-04 11:41:23 -08:00
Noah Levitt 30215e849b namespace scope log logger to crawl job
This is a bad bug. Stupid, too. When multiple crawls are running with
`DecideRuleSequence.logToFile` enabled, all the scope log lines from all
the crawls are going to all the scope logs for all the crawls. It was
because of this line:

    Logger logger = Logger.getLogger(logName + ".log");

`logName` here is "scope" normally, for all crawl jobs.
`Logger` is shared across the whole java vm, so
`Logger.getLogger("scope.log")` returns the same logger for every
crawl job. Each time a crawl starts, it adds another output file to
the logger.

Fix is to give the logger a name specific to the crawl job.

😳🥵🥶💩
2019-01-04 11:25:31 -08:00
Barbara Miller 1a5340daee Merge pull request #224 from nlevitt/hbase-refactor
un-threadlocal the HConnection
2018-12-18 12:20:17 -08:00
Noah Levitt d7d320d372 un-threadlocal the HConnection
realized that we're leaking zookeeper connections, and it might be
because the HConnection has been thread local, which probably means that
at shutdown only one of the possibly many connections is cleaned up

zookeeper by default allows 60 connections per client and it looks
likely that we start having trouble when we hit that limit
2018-12-18 10:31:33 -08:00
Barbara Miller 3ca01ec3a9 Merge pull request #223 from nlevitt/hbase-refactor
merging reset HBaseAdmin on error
2018-12-03 15:07:35 -08:00
Noah Levitt ebcd6c8cf5 reset HBaseAdmin on error
maybe with this change it will be able to recover
2018-12-03 14:52:20 -08:00
jkafader 64d39d56dc Merge pull request #222 from nlevitt/hbase-refactor
keep trying to start up hbase dedup forever
2018-11-26 16:19:03 -08:00
Noah Levitt 5b911a09b8 keep trying to start up hbase dedup forever 2018-11-26 12:06:14 -08:00
Barbara Miller 89ad2652da Merge pull request #220 from nlevitt/deciding-optimization
implement PredicatedDecideRule.onlyDecision()
2018-11-16 09:52:42 -08:00
Noah Levitt fea6241fac implement PredicatedDecideRule.onlyDecision()
DecideRuleSequence already has the optimization that I was looking for,
namely, don't bother evaluating a DecideRule if we know it won't change
the current result. For some reason PredicatedDecideRule, which is a
parent class to most of the decide rules in heritrix, didn't implement
onlyDecision(). Certain crawl configurations could see significant
performance improvement with this change.
2018-11-15 11:13:27 -08:00
Barbara Miller 20c6814a51 Merge pull request #219 from nlevitt/hbase-refactor
use non-deprecated hbase api
2018-11-12 10:47:12 -08:00
Noah Levitt f8f80249f2 make it thread safe using ThreadLocal
this is the easiest thing to do to make it thread safe while reusing
hbase connections
2018-11-09 17:08:01 -08:00
Noah Levitt 8bda0d4cf0 use non-deprecated hbase api
Catch exceptions and attempt to reset the hbase connection. The intent
is for this to fix the problem where the hbase connection (under the
hood the problem is the zookeeper connection) gets into a borked state,
and we never reset it.
2018-11-09 15:28:17 -08:00
Edward Betts aa705bef2e Correct spelling mistakes. 2018-11-04 19:49:37 +09:00
Andy Jackson e08d3ad45d Note feature only applies to forthcoming 3.3 release 2018-11-03 09:30:32 +00:00
Andrew Jackson 3a299d7899 Update API with note about checkpoint launching. 2018-11-01 20:20:17 +09:00
Noah Levitt 9bad8a11ae Merge pull request #215 from ukwa/use-latest-checkpoint
Extend API to simplify using the latest checkpoint
2018-10-31 16:27:30 -07:00
Andrew Jackson 0aa20a9a68 Merge branch 'master' into use-latest-checkpoint 2018-10-12 12:51:06 +01:00
Andy Jackson a81a648996 Merge pull request #213 from ukwa/frontier-threadsafe-workqueues
Ensure frontier work queues are updated safely across threads.
2018-10-12 12:48:33 +01:00
Andrew Jackson 59ee9b2adc Default to starting anew if no checkpoints are found. 2018-10-09 10:28:34 +01:00
Andrew Jackson 3b341f79df Provide a simple hook to restart from the latest checkpoint. 2018-10-08 14:26:04 +01:00
Andrew Jackson fca796265d Move sync to after Null check. 2018-09-17 15:25:45 +01:00
Andrew Jackson e4973e4375 Attempt to cache dependencies. 2018-09-16 16:15:02 +01:00
Andrew Jackson 8ffd2c2813 Simplify contrib build. 2018-09-14 17:03:25 +01:00
Andrew Jackson 2330641931 Attempt to prevent build time-outs. 2018-09-14 15:57:50 +01:00
Andrew Jackson 09a272088e Add synchronisation around host and server stats. 2018-09-13 16:37:18 +01:00
Andrew Jackson 55dbe5a25d Avoid overdoing the RAM allocation. 2018-09-13 16:36:58 +01:00
Andrew Jackson a2af528501 Ensure all WorkQueue modification as serialised across threads. 2018-09-13 13:45:10 +01:00
Andrew Jackson 992a51aa57 Tests now need more RAM. 2018-09-13 13:44:40 +01:00
Noah Levitt a831676196 Merge pull request #209 from ukwa/relative-base-href
HtmlExtractor: allow relative hrefs in the base element
2018-09-11 15:18:48 -07:00
Noah Levitt 9c9d11d272 fix exception starting DecideRuleSequence logging
I don't know why we've never seen this before, and now we suddenly have
a case of it, but this is the exception:

2018-07-23 17:47:01.123 SEVERE thread-2875088 org.archive.crawler.framework.CrawlJob.beansException() Failed to start bean 'scope'; nested exception is java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /1/ait-h3-jobs/8144-20180723162745141/20180723174701/logs/scope.log.lck
org.springframework.context.ApplicationContextException: Failed to start bean 'scope'; nested exception is java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /1/ait-h3-jobs/8144-20180723162745141/20180723174701/logs/scope.log.lck
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:169)
        at org.springframework.context.support.DefaultLifecycleProcessor.access$1(DefaultLifecycleProcessor.java:154)
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:335)
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143)
        at org.springframework.context.support.DefaultLifecycleProcessor.start(DefaultLifecycleProcessor.java:89)
        at org.springframework.context.support.AbstractApplicationContext.start(AbstractApplicationContext.java:1236)
        at org.archive.spring.PathSharingContext.start(PathSharingContext.java:115)
        at org.archive.crawler.framework.CrawlJob.startContext(CrawlJob.java:455)
        at org.archive.crawler.framework.CrawlJob$1.run(CrawlJob.java:428)
Caused by: java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /1/ait-h3-jobs/8144-20180723162745141/20180723174701/logs/scope.log.lck
        at org.archive.crawler.reporting.CrawlerLoggerModule.setupSimpleLog(CrawlerLoggerModule.java:298)
        at org.archive.modules.deciderules.DecideRuleSequence.start(DecideRuleSequence.java:174)
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:166)
        ... 8 more
Caused by: java.nio.file.NoSuchFileException: /1/ait-h3-jobs/8144-20180723162745141/20180723174701/logs/scope.log.lck
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
        at java.nio.channels.FileChannel.open(FileChannel.java:287)
        at java.nio.channels.FileChannel.open(FileChannel.java:335)
        at java.util.logging.FileHandler.openFiles(FileHandler.java:478)
        at java.util.logging.FileHandler.<init>(FileHandler.java:344)
        at org.archive.io.GenerationFileHandler.<init>(GenerationFileHandler.java:63)
        at org.archive.io.GenerationFileHandler.makeNew(GenerationFileHandler.java:158)
        at org.archive.crawler.reporting.CrawlerLoggerModule.setupLogFile(CrawlerLoggerModule.java:275)
        at org.archive.crawler.reporting.CrawlerLoggerModule.setupSimpleLog(CrawlerLoggerModule.java:296)
        ... 10 more
2018-07-27 09:49:17 +09:00
Andrew Jackson 8384a59b47 Fix up tests to account for new Base URI behaviour. 2018-07-06 15:15:53 +01:00
Andrew Jackson 8bf23081fa Only set the BaseURI if not set already. 2018-07-05 13:34:17 +01:00
Andrew Jackson 14148cc7a8 Same fix for JerichoExtractorHTML. 2018-07-05 09:40:21 +01:00
Andrew Jackson 42181b8585 Test case and fix for internetarchive/heritrix3#208. 2018-07-04 16:18:46 +01:00
Maurice Schleußinger 48908ee5b4 Fix link to User Guide 2018-07-04 22:53:43 +09:00
Alex Osborne da9fcf1af6 Fix typos 2018-07-04 22:22:15 +09:00
Alex Osborne 2d48b40ea4 Replace API response section with statuscode tag 2018-07-04 21:46:42 +09:00
Alex Osborne 0cfd62f76e Reformat the rest of the API calls 2018-07-04 21:43:57 +09:00
Alex Osborne 3b3d579cb8 Add actions to API URLs to distinguish them 2018-07-04 21:16:53 +09:00
Alex Osborne 1ff31c135e Add explanatory note about documentation 2018-07-04 19:48:33 +09:00
Alex Osborne 7076dd6388 Try nicer formatting for the first API example 2018-07-04 18:46:15 +09:00
Alex Osborne ab8a5efea2 Format HTTP request lines in API guide 2018-07-04 18:24:08 +09:00
Alex Osborne e35eb9e850 Move conventions and REST section to the end of the document
Let's dive right into the API. Chances are anyone who wants to use
the REST API already knows what it is. :-)
2018-07-04 17:53:05 +09:00
Alex Osborne 57f465706e Convert html tables to rst tables 2018-07-04 17:34:19 +09:00