Added progress statistics as notifications.
They are emitted at whatever the rate set for logging
in progress stats log (Its set in order file).
The emission is a little perverse. It is an instance
of AttributeChangeNotification:
http://www.cise.ufl.edu/depot/www/JDK-1.5.0/api/javax/management/AttributeC
hangeNotification.html.
source, seqnumber and timestamp should be obvious.
Message is the progress statistics as a string.
attributename is 'progressStatistics'. Attribute type
is 'java.util.HashMap'. old value is old statistics
HashMap, new value is new statistics as HashMap.
I toyed with sending each of the elements of the
hashmap as its own attributechangenotification (if has
changed since last progressstats time) but seems like
we'd be giving out 12 or 14 messages every 20 seconds
or so for each instance. The implementation would be
cleaner but might be too many messages.
Also, to make these notifications show up in CrawlJob,
had to rework StatisticsTracker so that its progress
statistics logging could be noticed in crawl controller
and subsequently in CrawlJob. Not pretty.
We might want to add registration of parties interested
in StatisticsTracker -- but then we'd have a 3rd event
publisher (Currently we have Crawl Status events
managed by CrawlController and Crawl URI changes
managed by frontier). Might want to amalgamate
eventing in Heritrix -- especially as the extant
eventing mechanism could do with some rework.
Michael Stack
API
1.8.0
Public
|
Date: 2007-03-14 01:45
|
|
Date: 2005-12-07 22:27 Logged In: YES |
|
Date: 2005-12-07 01:55 Logged In: YES |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2005-12-07 01:55 | stack-sf |
| close_date | - | 2005-12-07 01:55 | stack-sf |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use