Commit Graph
729 Commits
Author SHA1 Message Date
Alex OsborneandGitHub 671eca0e76 Merge pull request #408 from internetarchive/crawl-log-syntax
Add basic syntax highlighting to the crawl.log viewer
2021-06-30 12:33:23 +09:00
Alex OsborneandGitHub c26307068f Merge pull request #406 from internetarchive/run-job-option
Fix and document the -r option which runs a named job on startup
2021-06-25 11:53:14 +09:00
Alex Osborne e9d5966c22 Add basic syntax highlighting to the crawl.log viewer
Colour-codes the fetch status codes and shows the corresponding
status message when you hover over them. No more referring to the
glossary. :-)
2021-06-22 23:06:53 +09:00
Alex Osborne a38fda2b72 Fix and document the -r option which runs a named job on startup
I noticed there was a non-functional and undocumented -r command-line
option which automatically runs a given job when Heritrix starts. I
suspect this was never finished due to the bug that was fixed in commit
643f16d where launch() returns before the job has been launched.

This option seems like it would be very useful so you could run a job
from cron or another scheduling program without having to use the
REST API to start it. Therefore I've enabled it and extended it so it
also unpauses, waits for the crawl to finish and then exits.
2021-06-22 20:16:23 +09:00
Alex Osborne 643f16d20c Remove arbitrary 1.5 second sleep() when launching jobs
I think the sleep is supposed to make launch() not return until the job
has actually been launched but it doesn't work as launch()
and getCrawlController() are both synchronized therefore the
launcher thread can't actually call startContext() until launch()
returns after sleeping.

So let's replace the sleep call with join and unsynchronize launch()
so it doesn't deadlock. All the relevant methods it calls seem to be
synchronized so I think it's no worse to not synchronize it itself.
2021-06-22 19:43:38 +09:00
Alex Osborne c0cb68f754 Speed up the unit tests by changing some 1s polling sleeps to 250ms
Lots of 1 second sleeps add up fast. On my PC this reduces the runtime
of `mvn clean test` from about 3m 40s to about 1m 50s.

Ideally we'd probably re-architect some this to use a notification
mechanism instead of polling but that's easier said than done and this
is a pretty big improvement by itself.
2021-06-22 17:10:50 +09:00
Alex Osborne 16a49d3527 Remove arbitrary 1.5 second sleep() when launching jobs
I think the sleep is supposed to make launch() not return until the job
has actually been launched but it doesn't work as launch()
and getCrawlController() are both synchronized therefore the
launcher thread can't actually call startContext() until launch()
returns after sleeping.

So let's replace the sleep call with join and unsynchronize launch()
so it doesn't deadlock. All the relevant methods it calls seem to be
synchronized so I think it's no worse to not synchronize it itself.
2021-06-22 17:10:50 +09:00
Andrew Jackson 0e93e22ba9 [maven-release-plugin] prepare for next development iteration 2021-06-21 15:42:52 +01:00
Andrew Jackson 846f2bc2cc [maven-release-plugin] prepare release 3.4.0-20210621 2021-06-21 15:42:46 +01:00
Kristinn Sigurdsson 37913cbb2e Graceful UI shutdown 2021-06-18 10:56:20 +00:00
Andrew Jackson a5beb7d6e9 [maven-release-plugin] prepare for next development iteration 2021-06-18 09:41:30 +01:00
Andrew Jackson 30598f8402 [maven-release-plugin] prepare release 3.4.0-20210618 2021-06-18 09:41:24 +01:00
Andrew Jackson 3423cab6a6 [maven-release-plugin] prepare for next development iteration 2021-06-17 14:39:00 +01:00
Andrew Jackson 7368ded9c2 [maven-release-plugin] prepare release 3.4.0-20210617 2021-06-17 14:38:54 +01:00
Andy Jackson 5caa83d327 Only update last checkpoint stats if the checkpoint completed, for #392. 2021-05-28 12:42:17 +01:00
Andrew Jackson d3dfb34f83 [maven-release-plugin] prepare for next development iteration 2021-05-27 10:03:10 +01:00
Andrew Jackson 9dcbb240a6 [maven-release-plugin] prepare release 3.4.0-20210527 2021-05-27 10:03:04 +01:00
Andy Jackson a2c65f4618 Update dependencies for security issues, including changes to tests. 2021-05-26 13:39:30 +01:00
Andy JacksonandGitHub c0dbfb2a0a Merge pull request #383 from ukwa/upgrade-dnsjava
Update to latest version of dnsjava, for #344
2021-05-20 21:05:59 +01:00
Andy JacksonandGitHub 396467c535 Merge branch 'master' into sitemaps 2021-05-20 21:03:54 +01:00
Andy JacksonandGitHub c7b1dfa198 Merge pull request #368 from webdev4422/patch-1
Fix misspell in comments
2021-05-20 20:58:41 +01:00
Andy Jackson 045b2516da Update to latest version of dnsjava, for #344
This commit updates to version 3.3.1 of the dnsjava library.

Incidentally, the restlet.org certificate is currently invalid, so this
patch switched to maven.restlet.com.
2021-05-20 20:44:19 +01:00
Alex OsborneandGitHub a09479364a Merge pull request #379 from ldko/bean-url-missing-fix
Avoid error when bean properties have no url available
2021-05-12 09:31:27 +09:00
Lauren Ko ac33e2ef55 Avoid error when bean properties have no url available 2021-05-11 16:42:33 -05:00
Alex Osborne 71b3065172 Handle empty Optionals when browsing beans
addPresentableNestedNames() recursively walks the properties of beans
calling getters. Likely unintentionally this includes calling getClass()
and recursing into the reflection API. When running on JDK 11 the
reflection API has some methods (e.g. in java.lang.module) that return
instances of Optional. With the newer version of Spring's
BeanWrapperImpl encounters an Optional it attempts to unwrap it and
throws IllegalArgumentException if it is empty.

Let's fix this in two ways. Firstly let's avoid walking the reflection
API entirely as its irrelevant for the purposes of bean browsing by
not inspecting the properties of instances of java.lang.Class.

Secondly in case any Heritrix beans start using Optional in future lets
also handle the empty case by also not inspecting, the same as we do for
null.

Fixes #376
Reported-By: Lauren Ko <lauren.ko@unt.edu>
2021-05-11 21:55:03 +09:00
webdev4422andGitHub 5ec7fb87d9 Fix misspell in comments 2021-02-26 08:50:13 +02:00
Andrew Jackson e215b89963 [maven-release-plugin] prepare for next development iteration 2020-05-18 14:08:12 +01:00
Andrew Jackson ef38dc08c3 [maven-release-plugin] prepare release 3.4.0-20200518 2020-05-18 14:08:04 +01:00
Clara Wiatrowski eea3914059 Add missing import 2020-04-21 16:00:21 +02:00
Clara Wiatrowski b61f7e574e Add real crawlStatus in the crawlReport 2020-04-17 14:53:00 +02:00
Andrew Jackson ff05de44b6 [maven-release-plugin] prepare for next development iteration 2020-03-04 23:05:41 +00:00
Andrew Jackson a1bdcb1be7 [maven-release-plugin] prepare release 3.4.0-20200304 2020-03-04 23:05:33 +00:00
Andy JacksonandGitHub e0c82f70e9 Merge pull request #289 from netarchivesuite/bdb-frontier-access
Bdb frontier access
2020-03-04 13:41:27 +00:00
Jonathan LeitschuhandAlex Osborne bc6a15b41d Use HTTPS to resolve dependencies in Maven Build where possible 2020-02-11 17:48:20 +09:00
Lauren Ko 8c1c8009c6 Fix stream closed exception for Paged view 2020-01-30 16:48:38 -06:00
Alex OsborneandGitHub 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
jkafaderandGitHub 3a8b58998c Merge pull request #285 from nlevitt/warc-writer-chain
Warc writer chain
2020-01-13 16:39:42 -08:00
Nicholas ClarkeandColin Rosenthal 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
Noah LevittandGitHub cefad96036 Merge pull request #276 from internetarchive/jdk11-upgrade-jetty
JDK11 support: upgrade to Jetty 9.4.19, Restlet 2.4.0 and drop JDK 7 support
2019-08-07 10:48:51 -07:00
Noah LevittandGitHub 6811f49bd9 Merge pull request #272 from internetarchive/jdk11-upgrade-surefire
JDK11 support: upgrade maven-surefire-plugin to 2.22.2
2019-08-07 10:48:29 -07:00