Commit Graph
2023 Commits
Author SHA1 Message Date
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 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 Osborne 7a1c4f5334 Merge pull request #270 from internetarchive/travis-fixes
Travis fixes
2019-08-02 16:08:12 +09:00
Alex Osborne 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 Miller 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
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 Jackson 8492306241 Merge pull request #238 from ruebot/issue-233
Add CHANGELOG; address #233.
2019-04-17 22:50:01 +01:00
Adam Miller f1683264d5 Merge pull request #251 from nlevitt/trough-dedup
fix some trough dedup bugs
2019-04-15 14:40:13 -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
Noah Levitt 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
Noah Levitt 303ffb486e close the rethinkdb connection! 2019-04-10 10:43:22 -07:00
Noah Levitt fc16e4ec3e Merge branch 'master' into trough-dedup
* master:
  replace System.err.println with logger.info
  Revert "Upgrade httpclient to 4.5.7 and handle cookies more compliantly"
  Removing outdated test.
  Disable questionalbe test.
  Avoid deprecated flag.
  Supply an iterator, for #245
  Updated POM to use latest version.
  Update README.md
  Handle missing closing paren in srcset descriptor
  Teach jericho extractor srcset
  Don't run srcset test against jericho, it doesn't handle it
  Handle commas more compliantly when parsing srcset
  Ensure we start parsing full lines, for #239.
2019-04-10 10:16:45 -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
Noah Levitt 5f5d4615c2 fix some trough dedup bugs
especially this:

-    writeUrlCache.remove("segmentId");
+    writeUrlCache.remove(segmentId);

and some improvements and tweaks
2019-04-01 16:14:22 -07:00
nruest 5ee7528369 Remove suffix from warcWriter since it is no longer used. 2019-03-29 12:40:51 -04:00
Alex Osborne b68731e2b9 Merge pull request #248 from internetarchive/revert-246-upgrade-httpclient
Revert "Upgrade httpclient to 4.5.7 and handle cookies more compliantly"
2019-03-28 10:19:22 +09:00
Alex Osborne dd37598470 Revert "Upgrade httpclient to 4.5.7 and handle cookies more compliantly" 2019-03-28 10:14:42 +09:00
Noah Levitt 954043cdf3 Merge pull request #246 from ukwa/upgrade-httpclient
Upgrade httpclient to 4.5.7 and handle cookies more compliantly
2019-03-22 10:38:20 -07:00
jkafader 1099c152cf Merge pull request #242 from nlevitt/trough-dedup
Trough dedup
2019-03-21 15:49:17 -07:00
Noah Levitt c596f49c8a use constant from rethinkdb lib for default port 2019-03-21 15:34:42 -07:00
Andrew Jackson 03da8c06cf Merge branch 'master' into upgrade-httpclient 2019-03-21 00:06:10 +00:00
Andrew Jackson 044f068d1b Removing outdated test. 2019-03-21 00:06:05 +00:00
Andrew Jackson 629a7adcb6 Disable questionalbe test. 2019-03-20 22:02:58 +00:00
Andrew Jackson 2fbe603878 Avoid deprecated flag. 2019-03-20 22:02:35 +00:00
Andrew Jackson e910bb6a5b Supply an iterator, for #245 2019-03-20 21:18:19 +00:00
Andrew Jackson 0235a0e553 Updated POM to use latest version. 2019-03-20 20:26:51 +00:00
Noah Levitt fd0e86cd64 less alarming logging for normal situation 2019-03-20 11:31:40 -07:00
Adam Miller dff29b1685 Merge pull request #243 from internetarchive/srcset
Handle commas more compliantly when parsing srcset
2019-03-19 09:53:23 -07:00
Noah Levitt c4ec9d31fe make TroughCrawlLogFeed use TroughClient, and...
... configure using rethinkdb url and segment id, instead of write url,
which means it can work if the segment gets reassigned and so forth
***backward incompatible change***
2019-03-18 22:39:29 -07:00
Alex Osborne fcc3bc2940 Merge pull request #244 from mikeizbicki/patch-1
Update README.md
2019-03-19 12:41:25 +09:00
Mike Izbicki 102b5086eb Update README.md
Fix typo in link
2019-03-18 20:26:15 -07:00
Alex Osborne 7d91a1d4ee Handle missing closing paren in srcset descriptor 2019-03-16 16:02:48 +09:00
Alex Osborne 2a34fcffd6 Teach jericho extractor srcset 2019-03-16 15:47:50 +09:00
Alex Osborne e1d93e3308 Don't run srcset test against jericho, it doesn't handle it 2019-03-16 12:35:57 +09:00
Alex Osborne 90c52c3a25 Handle commas more compliantly when parsing srcset
Commas are allowed if they're in the middle of the URL. Consequently:

    srcset="a,b,,c,"   => ["a,b,,c"]
    srcset="a, b,, c," => ["a", "b", "c"]

They occur particularly commonly in data: URLs before the base64 value.

Commas are also allowed in descriptors if they are enclosed by parens:

    srcset="a (b,c),d" => ["a", "d"]

Spec: https://html.spec.whatwg.org/multipage/images.html#parsing-a-srcset-attribute
2019-03-16 11:53:37 +09:00
Noah Levitt af1a325319 fix bugs around crawl finish
- make sure we "promote" segments (persist them to hdfs) after we're
  entirely finished writing to theme; in other words, when we reach the
  FINISH state, not while STOPPING
- shut down the promoter thread at crawl finish

plus a couple of tweaks and cleanups
2019-03-15 14:12:50 -07:00
Noah Levitt 7f7fb3cfe8 allow travis-ci jdk7 failures because contrib...
... needs java 8 now, and travis-ci builds contrib
2019-03-14 16:58:22 -07:00