[HER-1883] seeds result info (for seeds report, crawl report tally) lost after checkpoint & resume

* SeedRecord.java
    ensure makeDirty() is called after every updateWith() (but not the initial instantiation)
This commit is contained in:
gojomo
2011-04-20 02:38:26 +00:00
parent 70d21ca2da
commit 630ddb4deb
@@ -52,7 +52,7 @@ public class SeedRecord implements CoreAttributeConstants, Serializable, Identit
public SeedRecord(CrawlURI curi, String disposition) {
super();
this.uri = curi.getURI();
updateWith(curi,disposition);
fillWith(curi,disposition);
}
/**
@@ -86,11 +86,24 @@ public class SeedRecord implements CoreAttributeConstants, Serializable, Identit
/**
* A later/repeat report of the same seed has arrived; update with
* latest. Should be rare/never?
* latest.
*
* @param curi
* @param disposition
*/
public void updateWith(CrawlURI curi,String disposition) {
fillWith(curi, disposition);
this.makeDirty();
}
/**
* Fill instance with given values; skips makeDirty so may be used
* on initialization.
*
* @param curi
* @param disposition
*/
protected void fillWith(CrawlURI curi, String disposition) {
if(!this.uri.equals(curi.getURI())) {
logger.warning("SeedRecord URI changed: "+uri+"->"+curi.getURI());
}