Commit Graph

628 Commits

Author SHA1 Message Date
Andy Jackson e0c82f70e9 Merge pull request #289 from netarchivesuite/bdb-frontier-access
Bdb frontier access
2020-03-04 13:41:27 +00:00
Lauren Ko 8c1c8009c6 Fix stream closed exception for Paged view 2020-01-30 16:48:38 -06:00
Alex Osborne b45f774066 Merge pull request #300 from hennekey/fix-299
Use Guice instead of custom implementation
2020-01-30 19:12:05 +09:00
Alex Osborne a4ce59dbd6 Fix stream closed exception by not closing output stream
ServerCall.writeResponseBody() flushes it after we return so it must
remain open.

Fixes #305
2020-01-25 08:25:59 +09:00
Tim Hennekey 33458f1518 Fix assertions
By using assertEquals and seting the expected and actual values, the
failure messages become a bit more useful.
2020-01-22 17:13:58 -05:00
Noah Levitt 784b3a5dec fix logging config
by setting system property java.util.logging.config.file, because new
version restlet reconfigures logging after heritrix has already
configured it
2020-01-22 13:39:24 -08:00
Alex Osborne 34be934da5 Fix 'Method Not Allowed' on POST of config editor form
Under Restlet 2 `getVariants()` always returns null for a POST so our
post() method was never called and 405 Method Not Allowed was returned.
We don't need content negotiation for the POST response anyway so let's
instead override the no-variants post() like we do for put().

Fixes #293
2020-01-15 16:51:52 +09:00
jkafader 3a8b58998c Merge pull request #285 from nlevitt/warc-writer-chain
Warc writer chain
2020-01-13 16:39:42 -08:00
Nicholas Clarke c611c46c8a Merged frontier-management with upgrade to bdb 7 2019-11-15 10:33:13 +01:00
Noah Levitt 74c0739bb0 fix line ending and indentation issues 2019-10-11 13:49:49 -07:00
Adam Miller 0cee24922f AssignmentLevelSurtQueueAssignmentPolicy.java - Add support for forced queue assignment and parallel queues
URIAuthorityBasedQueueAssignmentPolicy.java - Add interoperability between forced queue assignment and parallel queues
QuotaEnforcer.java - Fix javadoc to match default behavior
2019-10-11 19:44:35 +00:00
Alex Osborne eeddfd763f Override PUT so it doesn't change the file extension
Fixes #282 and HER-1907
2019-08-28 12:46:29 +09:00
Alex Osborne 5612fa249b Use super.getVariants() rather than super.getVariants(GET)
This was a regression introduced in the upgrade to Restlet 2. I
encountered a NullPointerException here when upgrading and misunderstood
the cause of it. Since PUT and DELETE return no content they are
actually supposed to return null.
2019-08-27 23:53:34 +09:00
Alex Osborne 38c44e8e8e Add missing UUID import (interactive commit fail) 2019-08-12 17:50:35 +09:00
Alex Osborne 36003b8626 Fix digest authentication
In Restlet 2 it appears we need to use DigestAuthenticator.
(Previously both digest and basic auth were handled by the same
Guard class.)
2019-08-12 17:36:28 +09:00
Alex Osborne 97b9c3c91c Fix restlet child component context warning 2019-08-06 17:13:29 +09:00
Alex Osborne 6c2afc36b0 Update statistics assertions as Jetty 9 produces different headers 2019-08-06 17:13:02 +09:00
Alex Osborne 4012a5f4dd Fix 'No session data store configured' test error 2019-08-06 16:56:10 +09:00
Alex Osborne 0782fb0481 JDK11: upgrade engine to jetty 9.4.19 and restlet 2.4.0
Jetty 9.4.12+ is required for TLS to work correctly under JDK11
(due to SSL handshake failures). In order to upgrade
Jetty we also need to upgrade Restlet.

There is one intentional change in behaviour to simplify
upgrading. We remove a workaround for an old [webkit bug]
where the browser claimed to prefer application/xml. The
bug was fixed in 2011.

[webkit bug]: https://bugs.webkit.org/show_bug.cgi?id=27267

Summary of Jetty API changes:
- package names changed such as org.mortbay -> org.eclipse
- SocketConnector and SslSocketConnector merged to ServerConnector
- HashUserRealm split into UserStore and HashLoginService
- SecurityHandler -> ConstraintSecurityHandler

Summary of Restlet API changes:
- some classes have moved package (Request, Response, Router etc)
- ServerResource replaces Resource
- represent(), acceptRepresentation() renamed to get(), post()
- constructors were replaced by an init() method
- setModifiable() was removed
- getRequest().getEntityAsForm() -> new Form(entity)
- Guard -> ChallengeAuthenticator

Fixes #275
2019-08-06 15:16:37 +09:00
Noah Levitt 7c31b0752a use WARCWriterChainProcessor for these tests 2019-06-12 12:56:49 -07:00
Noah Levitt 8c4c443a88 default chain in code 2019-06-12 12:54:00 -07:00
Noah Levitt 9435f761a6 configurable warc writer chain
exercised only lightly at this point
2019-06-11 13:45:51 -07:00
Noah Levitt 1bd8b713c6 quiet org.mortbay.log (jetty?) logging
There is already a clause for this in logging.properties, but it's using
log4j. It was dumping stack traces every time the client was dubious of
heritrix's self-signed certificate.

Why do we have so many identical log4j.xml's? 🤷‍♂️
2019-04-30 16:17:35 -07:00
Noah Levitt 79a0d34adf ExtractorYoutubeDL 2019-04-29 15:29:16 -07:00
Noah Levitt a60b2ef387 Merge pull request #249 from ruebot/remove-suffix-crawler-bean
Remove suffix from warcWriter since it is no longer used.
2019-04-10 11:15:37 -07:00
David Van Duzer 6c6e460c8d set of frontier management changes to support CrawlHQ module
These changes come from a private fork of H3, originally made by Kenji
Nagahashi, to create org.archive.crawler.frontier.PullingBdbFrontier,
which we intend to merge into 'contrib' of the official version in the
near future.
2019-04-08 17:15:24 -06:00
Noah Levitt 2c6ab5a44a replace System.err.println with logger.info 2019-04-04 17:06:01 -07:00
nruest 5ee7528369 Remove suffix from warcWriter since it is no longer used. 2019-03-29 12:40:51 -04:00
Andrew Jackson afa88c025e Ensure we start parsing full lines, for #239. 2019-03-13 21:00:19 +09:00
Andrew Jackson 91b18e9bbd Allow failed lookups to expire, for #234. 2019-02-21 23:04:40 +00:00
Andrew Jackson 3b435cb0a9 Add synchronized statements for internetarchive/heritrix3#221. 2019-02-04 10:41:40 +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
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
Edward Betts aa705bef2e Correct spelling mistakes. 2018-11-04 19:49:37 +09: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 09a272088e Add synchronisation around host and server stats. 2018-09-13 16:37:18 +01:00
Andrew Jackson a2af528501 Ensure all WorkQueue modification as serialised across threads. 2018-09-13 13:45:10 +01:00
Andrew Jackson 8384a59b47 Fix up tests to account for new Base URI behaviour. 2018-07-06 15:15:53 +01:00
Adam Miller bee53de8b1 Add parameter to allow even distribution for parallel queues. 2018-05-10 21:34:02 +00:00
Noah Levitt 95759149ae catch exceptions scoping outlinks to stop them from derailing processing of the parent url 2018-01-16 17:12:24 -08:00
Andrew Jackson b0594ac0f4 Allow JavaDNS to be disabled and use that to avoid issues in StatisticsSelfTest. 2017-10-12 21:29:34 +01:00
Andrew Jackson 09ee95f37b Allow results with or without DNS lookup of localhost. 2017-10-11 23:30:17 +01:00
Andrew Jackson 401e27fc64 Adapt test to cope with variation in how localhost gets resolved. 2017-10-09 21:50:05 +01:00
Noah Levitt 3892c17b56 ughhh appease java 8 javadoc rules 2017-06-15 17:29:22 -07:00
Noah Levitt bc8b0baa59 Merge remote-tracking branch 'origin/master' into fix-test-errors
* origin/master:
  Setup TravisCI
  Set fetch status on curis when testing link extraction
  No link extraction on URI not successfully downloaded
  Fixes issue #158 : Noisy alerts about 401s without auth challenge (#159)
  Make Content-Location header url INFERRED not REFFER hop type since Content-Location is not for redirection (#151)
  fixes for kafka 0.9 (?)
  upgrade to kafka 0.9
  somewhat ugly fix to handle exceptions from the bean browser like java.lang.RuntimeException: not implemented at org.archive.modules.fetcher.BdbCookieStore$RestrictedCollectionWrappedList.get(BdbCookieStore.java:92)
2016-06-07 13:09:51 -05:00
Noah Levitt ca3b65ed03 exclude dns from stats tests because the size of the dns records can vary depending on the environment 2016-06-06 15:43:02 -05:00
Noah Levitt f7d1ad7f1f Merge pull request #111 from nlevitt/bean-browse-cookiestore-exception
somewhat ugly fix to handle exceptions from the bean browser like java.l...
2016-06-06 11:11:45 -07:00