Commit Graph
1373 Commits
Author SHA1 Message Date
Noah Levitt ea19dacbd2 handle main job log handler like current launch job log handler, close on teardown 2014-02-26 17:19:50 -08:00
Martins Balodis 88dc01305f fix job.log file handler was left open when jobdir is removed 2014-02-26 21:15:38 +02:00
Noah Levitt 659c5e886f Merge pull request #42 from eldondev/master
Adding the queue declaration and binding to the UrlReceiver
2014-02-25 14:15:30 -08:00
Eldon 06a75c6fcf Adding the queue declaration and binding to the UrlReceiver 2014-02-25 17:11:56 -05:00
Eldon bbd818e6e4 Merge pull request #39 from nlevitt/umbra
progress and formatting changes
2014-02-25 16:24:38 -05:00
Adam Miller e08936d029 Merge pull request #41 from nlevitt/fix-slow-cookies
Fix slow cookies
2014-02-21 15:51:49 -08:00
Noah Levitt cf775bec94 remove extraneous code related to logging removed in last commit 2014-02-21 15:46:52 -08:00
Noah Levitt fd806a514d remove extra logging from performance test 2014-02-21 13:28:13 -08:00
Noah Levitt 39f06a1f1c fix slowness caused by BdbCookieStore by maintaining cookie list in memory parallel to the one stored on disk; add tests for consistency and performance under load 2014-02-21 13:26:58 -08:00
Noah Levitt d130e3fc44 call the extra info we send to umbra "clientId", kinda clarifies the purpose of it 2014-02-13 19:25:09 -08:00
Noah Levitt e389499aa7 don't try to stop consuming amqp when crawl is shutting down, can end up reopening the connection after it's been closed 2014-02-13 19:24:31 -08:00
Hunter Stern 06ba50c410 Reverting previous commit: https://github.com/internetarchive/heritrix3/commit/164d0fbdc5fa32cd90edd9f1b4091ed876552232 2014-02-13 16:50:21 -08:00
Hunter Stern 164d0fbdc5 For https://webarchive.jira.com/browse/HER-2064 2014-02-13 16:42:58 -08:00
Noah Levitt 72b2d58034 pause amqp consumption on crawl pause, and resume on unpause 2014-02-10 21:04:19 -08:00
Noah Levitt c493248863 formatting change only - use 4 spaces to indent 2014-02-10 20:43:50 -08:00
Noah Levitt eccddb3df3 use parent url metadata received via amqp in building CrawlURI 2014-02-10 20:38:37 -08:00
Noah Levitt 8d82c440d3 send url metadata with amqp message so that umbra can send it back with child urls 2014-02-10 20:36:51 -08:00
Eldon 704f4aa443 Merge pull request #38 from nlevitt/umbra
Umbra - AMQPUrlReceiver.java receive urls via amqp and add to frontier, related changes
2014-02-06 16:51:03 -05:00
Noah Levitt 6dbcac40d9 syncronize start() and stop() 2014-02-03 20:27:51 -08:00
Noah Levitt 500dafd390 AMQPPublishProcessor - annotate urls sent to AMQP; set special fetch status; add default amqpUri; replace queueName setting with exchange and routingKey, which seem to be what are needed; avoid sending urls that were received from AMQP, and robots.txt urls; set content-type of amqp message to application/json, which umbra seems to need 2014-02-03 18:41:33 -08:00
Noah Levitt af44522fdf FetchHTTPRequest - include CrawlURI.getData().get("customHttpRequestHeaders"), if any, in http request 2014-02-03 18:41:23 -08:00
Noah Levitt ecb0eaf435 AMQPUrlReceiver - ack amqp messages, get rid of misguided thread starting infinite consumers 2014-02-03 18:36:52 -08:00
Noah Levitt e90ba8278b Merge branch 'master' into umbra 2014-02-03 18:22:25 -08:00
vonrosen 63b70b427e Merge pull request #37 from nlevitt/her-2063
fix HER-2063 - omit port in Host request header when it is default for t...
2014-02-03 17:42:34 -08:00
Noah Levitt edd62f3de0 fix HER-2063 - omit port in Host request header when it is default for the scheme 2014-02-03 17:18:40 -08:00
Noah Levitt c980b452c9 annotate CrawlURI with "receivedViaAMQP" 2014-02-01 18:26:07 -08:00
Noah Levitt c7cf62bf80 license header 2014-02-01 18:23:49 -08:00
Noah Levitt bf0590a083 spaces not tabs for indentation 2014-02-01 18:23:05 -08:00
Noah Levitt c163f31851 AMQPUrlReceiver - receive urls and request headers via amqp in the format produced by https://github.com/internetarchive/umbra and add to frontier 2014-01-31 20:42:27 -08:00
Noah Levitt 5e8219b014 pull in json dependency from ia-web-commons 2014-01-31 20:41:05 -08:00
Eldon 10ec391da1 Merge pull request #36 from nlevitt/bad-charset
Avoid the exception below by handling bad charsets in FetchHTTP. Restore...
2014-01-29 10:43:24 -08:00
Noah Levitt 31aea014d9 also handle case where Charset.forName() throws IllegalCharsetNameException, as opposed to UnsupportedCharsetException 2014-01-28 16:36:51 -08:00
Noah Levitt 161b359979 Avoid the exception below by handling bad charsets in FetchHTTP. Restore annotation "unsatisfiableCharsetInHeader:...". Includes unit tests for good and bad charsets.
SEVERE thread-5973 org.archive.crawler.framework.ToeThread.recoverableProblem() Problem java.nio.charset.UnsupportedCharsetException: binary occured when trying to process 'http://example.com/' at step ABOUT_TO_BEGIN_PROCESSOR in
java.nio.charset.UnsupportedCharsetException: binary
        at java.nio.charset.Charset.forName(Charset.java:543)
        at org.apache.http.entity.ContentType.<init>(ContentType.java:111)
        at org.apache.http.entity.ContentType.create(ContentType.java:210)
        at org.apache.http.entity.ContentType.get(ContentType.java:258)
        at org.apache.http.entity.ContentType.getOrDefault(ContentType.java:277)
        at org.archive.modules.fetcher.FetchHTTP.setCharacterEncoding(FetchHTTP.java:580)
        at org.archive.modules.fetcher.FetchHTTP.innerProcess(FetchHTTP.java:693)
        at org.archive.modules.Processor.innerProcessResult(Processor.java:175)
        at org.archive.modules.Processor.process(Processor.java:142)
        at org.archive.modules.ProcessorChain.process(ProcessorChain.java:131)
        at org.archive.crawler.framework.ToeThread.run(ToeThread.java:148)
2014-01-28 16:19:44 -08:00
vonrosen 6933232583 Merge pull request #35 from nlevitt/urls-with-spaces
whoops! send escaped path+query on http request line; had been sending r...
2014-01-27 18:04:00 -08:00
Noah Levitt b803ea0ec0 whoops! send escaped path+query on http request line; had been sending raw spaces (includes unit test) 2014-01-27 16:57:37 -08:00
Adam Miller 21f04cdf79 Merge pull request #34 from nlevitt/401-no-challenge
fix NullPointerException in case of 401 with no auth challenge (includes...
2014-01-27 11:52:51 -08:00
Noah Levitt 26a5dfebdc fix NullPointerException in case of 401 with no auth challenge (includes unit test) 2014-01-27 11:47:37 -08:00
Noah Levitt b1a28358d7 Merge pull request #33 from eldondev/master
First pass at a processor to publish crawluris to AMQP channels
2014-01-24 18:52:33 -08:00
Eldon b33d3faa75 Better Log messages 2014-01-24 18:49:04 -08:00
Eldon ab3aadf199 Pull out most umbra refs, only do http/https 2014-01-24 18:47:50 -08:00
Eldon d837536dc6 Use toString method instead 2014-01-24 18:28:38 -08:00
Eldon d3e96b2770 First pass at a processor to publish crawluris to AMQP channels 2014-01-24 18:11:47 -08:00
Kenji Nagahashi 7353f62d84 Merge pull request #32 from nlevitt/hc43
Switch to BasicHttpClientConnectionManager instead of PoolingHttpClientConnectionManager
2014-01-24 16:43:06 -08:00
Noah Levitt 6b72ac9705 Switch to BasicHttpClientConnectionManager instead of
PoolingHttpClientConnectionManager, and make the connection manager a member
variable of HttpRequest. We had been seeing a strange bug where once in
every few thousand urls or so, the connection manager would get gc'd
while the http request was being sent, and RecordingOutputStream.flush()
would get called, as in the stack trace below.  The ToeThread was using
it at the same time, so if conditions were right, the recorded stream
would get mangled. This commit makes the connection manager a member of
FetchHTTPRequest so it doesn't get gc'd prematurely. Also switches to
BasicHttpClientConnectionManager, since we're not doing any pooling.

  it.unimi.dsi.fastutil.io.FastBufferedOutputStream.dumpBuffer(boolean) line: 133
  it.unimi.dsi.fastutil.io.FastBufferedOutputStream.flush() line: 166
  org.archive.io.RecordingOutputStream.flush() line: 469
  org.apache.http.impl.io.SessionOutputBufferImpl.flushStream() line: 128
  org.apache.http.impl.io.SessionOutputBufferImpl.flush() line: 143
  org.archive.modules.fetcher.FetchHTTPRequest$RecordingHttpClientConnection(org.apache.http.impl.BHttpConnectionBase).close() line: 314
  org.archive.modules.fetcher.FetchHTTPRequest$RecordingHttpClientConnection.close() line: 520
  org.apache.http.impl.conn.CPoolEntry.closeConnection() line: 69
  org.apache.http.impl.conn.CPoolEntry.close() line: 95
  org.apache.http.impl.conn.CPool(org.apache.http.pool.AbstractConnPool<T,C,E>).shutdown() line: 130
  org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown() line: 347
  org.apache.http.impl.conn.PoolingHttpClientConnectionManager.finalize() line: 168
  java.lang.ref.Finalizer.invokeFinalizeMethod(java.lang.Object) line: not available [native method]
2014-01-24 16:07:04 -08:00
Kenji Nagahashi b1b2f2bc42 Merge pull request #31 from nlevitt/proxy-port-configurable
make http proxy port configurable in cxml, avoiding this: org.springfram...
2014-01-22 16:05:44 -08:00
Noah Levitt c5c8788227 make http proxy port configurable in cxml, avoiding this: org.springframework.beans.NotWritablePropertyException: Invalid property 'httpProxyPort' of bean class [org.archive.modules.fetcher.FetchHTTP]: Bean property 'httpProxyPort' is not writable or has an invalid setter method. Did you mean 'httpProxyHost'? 2014-01-22 16:01:21 -08:00
Kenji Nagahashi fafcc1e28b Merge pull request #30 from nlevitt/fix-bdb-cookie-store
Fix bdb cookie store (cookie is piling up due to lack of proper equality method in Cookie)
2014-01-21 12:01:10 -08:00
Noah Levitt 3ba476c39b restore useful comment 2014-01-20 20:05:12 -08:00
Noah Levitt cba663a107 fix BdbCookieStore so that cookies get replaced correctly! and test it 2014-01-20 20:02:56 -08:00
Noah Levitt 9a7e868022 BdbCookieStoreTest.java partly done 2014-01-20 09:13:55 -08:00