Commit Graph
2051 Commits
Author SHA1 Message Date
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
Noah LevittandGitHub feea47b2c7 Merge pull request #283 from internetarchive/jobdir-put-fix
Fix jobdir PUT
2019-08-28 12:41:00 -07: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
Noah LevittandGitHub 2eafb5a0c4 Merge pull request #280 from internetarchive/fix-cookie-test-failures
Mitigate random CookieStore.testConcurrentLoad test failures
2019-08-16 10:08:31 -07:00
Alex Osborne 2a5bd87e51 Remove testConcurrentLoad
Noah wrote in #280:

> Maybe we should just drop the test. The assumption when we wrote the
> test was that a race condition would not be so frequent in practice.
> We've seen that under the contrived conditions created by the test
> case, it is frequent. But that's ok
2019-08-16 22:11:26 +09:00
Alex Osborne a5c03d9b73 Mitigate random CookieStore.testConcurrentLoad test failures
The arbitary value `25` was used but in prace it's quite possible
for more than 25 writing threads to have checked the cookie count
limit before adding their cookie. In practice we see Travis failing
on this test quite often, every few builds in fact.

I think using `threads.length` (i.e. 200) should cover the worst
case possibility where every thread reads a stale count and tries
to add their cookie.

Fixes #274
2019-08-12 18:08:43 +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 OsborneandGitHub 92ffdede0d Link to javadoc.io for more recent api docs 2019-08-12 15:03:52 +09:00
Alex Osborne 8b72be7d1d Now jdk11 support is merged we can disallow test failures on it 2019-08-08 10:37:38 +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 a1f2c9513a Merge pull request #273 from internetarchive/jdk11-remove-old-bdbcache
JDK11 support: remove unused class ObjectIdentityBdbCache and tests
2019-08-07 10:48:40 -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
Noah LevittandGitHub ebb0d3fd48 Merge pull request #271 from internetarchive/jdk11-toolsjar
JDK11 support: exclude tools.jar from hbase-client dependency
2019-08-07 10:48:19 -07:00
Noah LevittandGitHub d5956d1443 Merge pull request #269 from internetarchive/jdk11-jaxb
JDK11 support: explicitly depend on JAXB
2019-08-07 10:48:02 -07: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 996d1366b0 Drop support for JDK 7
Jetty 9.4 requires JDK 8 or later. JDK 11 requires Jetty 9.4.12+.
Therefore unfortunately we cannot easily support both JDK 11 and JDK 7
at the same time.
2019-08-06 16:41:09 +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
Alex Osborne 9d1341c731 JDK11 support: upgrade jetty to 9.4.19 in modules tests
Fixes #268 ssl handshake_failure. Support for jdk11 was added in jetty
9.4.14 but we may as well bump to the latest stable version.

In Jetty 9 it appears the request is logged after the response is sent.
Thus it was racing with the assertions that check the client IP. So to
fix this rather stashing the 'lastRequest' we just make the server
echo the client's IP in a response header.

Some other minor tweaks were needed due to changes in Jetty behaviour:

- We stop checking the length of the raw response. It doesn't tell us
  anything and easily varies.

- Jetty now generates Set-Cookie with a space after the ;

- Jetty now lowercases the word "basic" in WWW-Authenticate header

- testLaxUrlEncoding(): Jetty now rejects bad paths with a 400 error so
  we disable the response checks. The actual request line is
  still checked which is the important thing.

Note: This patch does not affect the version of jetty used by the
Heritrix admin console. That will be tackled separately.
2019-08-05 14:35:09 +09:00
Alex OsborneandGitHub fea6a9c60c Merge pull request #256 from ruebot/readme-updates
Update README and add LICENSE.txt
2019-08-05 13:15:19 +09:00
Alex Osborne d3d19e2248 Prevent newer surefire from invoking FetchHTTPTests directly
It seems older versions only matched *Test.java but the new version
is now incorrectly including it.
2019-08-02 17:57:09 +09:00
Alex Osborne a5c2b46208 JDK11 support: remove unused class ObjectIdentityBdbCache and tests
In 2011 ObjectIdentityBdbCache was replaced by
ObjectIdentityBdbManualCache in order to "remove dependence on
GC/finalization/PhantomReference magic". It hasn't been used since.
As of JDK11 the ObjectIdentityBdbCache unit tests are failing so let's
remove it.
2019-08-02 17:10:13 +09:00
Alex Osborne bf819e19a5 JDK11 support: exclude tools.jar from hbase-client dependency
tools.jar is no longer included in the JDK as of JDK 11 (per JEP 220) so
exclude it as a dependency. According to [HBASE-13963] it is only
required when compiling hbase itself and was unintentionally leaked
as a transitive dependency.

Fixes #265

[HBASE-13963]: https://issues.apache.org/jira/browse/HBASE-13963
2019-08-02 16:47:42 +09:00
Alex Osborne a2920c622d JDK11 support: explicitly depend on JAXB
JAXB is no longer included in the JDK as of JDK 11 (JEP 320) so add it
as an external dependency.

Fixes #264
2019-08-02 16:47:20 +09:00
Alex Osborne 412885fd7d JDK11 support: upgrade maven-surefire-plugin to 2.22.2
Under JDK11 our old version of it throws ClassNotFoundExceptions when
tests load some builtin classes like javax.transaction.xa.Xid.

Fixes #266
2019-08-02 16:43:20 +09:00
Alex OsborneandGitHub 7a1c4f5334 Merge pull request #270 from internetarchive/travis-fixes
Travis fixes
2019-08-02 16:08:12 +09:00
Alex OsborneandGitHub 74a0222e56 Travis fixes
- use trusty dist image for oraclejdk8 and openjdk7 as they're [unavailable] in the new xenial image
- jdk7: skip building contrib rather than allowing failures
- contrib is now in the parent pom so remove its separate build command
- start testing against openjdk11 but allow failures for now

[unavailable]: https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/9
2019-08-02 15:47:02 +09:00
Adam MillerandGitHub de0c19f934 Merge pull request #257 from nlevitt/ydl
WIP: ExtractorYoutubeDL
2019-05-22 13:40:50 -07:00
Noah Levitt 99eebb8101 ugh, get it right
reading stderr in a separate thread doesn't help if you wait for that
thread to finish before reading stdout
2019-05-07 11:01:34 -07:00
Noah Levitt 75b33663f9 also annotate and log containing pages 2019-05-06 15:35:47 -07:00
Noah Levitt 7c66da7be7 whoops, better spawn the thread first 2019-05-02 15:48:46 -07:00
Noah Levitt b4aa3c9511 read stderr and stdout in separate threads...
... to avoid hanging

see https://github.com/internetarchive/heritrix3/pull/257/files#r279990349
thanks Alex!
2019-05-02 15:46:14 -07:00
Noah Levitt 37fb6f6b7b do not drop any CrawlURI.data between processing
Without this change (or other measures), we sometimes get nulls in the
ExtractorYoutubeDL log for containing page information. We'll run this
on QA for a while and see if it causes any problems.

nlevitt [1:59 PM]
https://github.com/internetarchive/heritrix3/blob/master/modules/src/main/java/org/archive/modules/CrawlURI.java#L878
drops some stuff from `CrawlURI.data` after processing a uri, even if it needs to be processed again
there is a list of keys that shouldn’t be dropped (`persistentKeys`), but it is final and private
so if you’re writing your own heritrix module and you want to keep some information in CrawlURI.data, it usually works, except when the url is processed more than once (like when it needs a prereq like robots.txt the first time)
in practice it seems that most data is persisted, that is, most commonly used keys are in `persistentKeys`
in a crawl with pretty standard configuration i’m mostly seeing `prerequisite-uri` dropped and occasionally `fetch-completed-time` and `fetch-began-time` being dropped
i’m highly skeptical of the value of dropping keys at all and i’m tempted to get rid of this entirely, make all the keys persistent in other words
soliciting feedback (edited)

anjackson [2:39 PM]
My immediate reaction is HARD AGREE. It looks like Really Old Code though (https://github.com/internetarchive/heritrix3/blame/7d3eff5269142c77fa4b988396153f4c29d16caa/modules/src/main/java/org/archive/modules/CrawlURI.java#L878)
so the reasons for doing so may have been lost in time.
Hm, looking at usage: https://github.com/internetarchive/heritrix3/blob/a60b2ef3875ad47f57b0c6b3c0b19f86c40a12f7/engine/src/main/java/org/archive/crawler/frontier/WorkQueueFrontier.java#L954-L955
engine/src/main/java/org/archive/crawler/frontier/WorkQueueFrontier.java:954-955

                curi.processingCleanup(); // lose state that shouldn't burden
                                          // retry

I guess there's a concern that there may be state in there that is set during a fetch and may cause problems if the same CrawlURI is deferred?
But I'm not aware of anything in the fetch chain that behaves like that.

nlevitt [3:02 PM]
oh, i missed `CrawlURI.addDataPersistentMember(String)` et al. still...
2019-04-30 16:20:53 -07:00
Noah Levitt b7de2bd2ae nothing private ever 2019-04-30 16:20:35 -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 21cfd4b73d making everything work 2019-04-30 16:16:25 -07:00
Noah Levitt 79a0d34adf ExtractorYoutubeDL 2019-04-29 15:29:16 -07:00
nruest 1ed207976c Update README and add LICENSE.txt
- Add badges to README
- Update Markdown
- Clean-up formatting
- Add LICENSE.txt in root
- Partially addresses #233
2019-04-23 20:55:09 -04:00
Andrew Jackson 7d3eff5269 Update changelog for 3.4.0-20190418 2019-04-18 16:17:50 +01:00
Andrew Jackson b3961a2f96 [maven-release-plugin] prepare for next development iteration 2019-04-18 15:36:28 +01:00
Andrew Jackson c7c6141ee1 [maven-release-plugin] prepare release 3.4.0-20190418 3.4.0-20190418 2019-04-18 15:36:20 +01:00
Andy JacksonandGitHub 8492306241 Merge pull request #238 from ruebot/issue-233
Add CHANGELOG; address #233.
2019-04-17 22:50:01 +01:00
Adam MillerandGitHub f1683264d5 Merge pull request #251 from nlevitt/trough-dedup
fix some trough dedup bugs
2019-04-15 14:40:13 -07:00
Noah LevittandGitHub 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
Noah LevittandGitHub a20b649576 Merge pull request #253 from dvanduzer/master
set of frontier management changes to support CrawlHQ module
2019-04-10 11:15:08 -07:00
Noah Levitt f1dae275b4 give me some space 2019-04-10 11:09:57 -07:00