if (page.getInlinks() != null) {
page.getInlinks().clear();
}
for (ScoreDatum inlink : inlinkedScoreData) {
page.putToInlinks(new Utf8(inlink.getUrl()), new Utf8(inlink.getAnchor()));
}
try {
scoringFilters.updateScore(url, page, inlinkedScoreData);
} catch (ScoringFilterException e) {
LOG.warn("Scoring filters failed with exception " +
StringUtils.stringifyException(e));
}
// clear markers
// But only delete when they exist. This is much faster for the underlying
// store. The markers are on the input anyway.
if (page.getFromMetadata(FetcherJob.REDIRECT_DISCOVERED) != null) {
page.removeFromMetadata(FetcherJob.REDIRECT_DISCOVERED);
}
Mark.GENERATE_MARK.removeMarkIfExist(page);
Mark.FETCH_MARK.removeMarkIfExist(page);
Utf8 mark = Mark.PARSE_MARK.removeMarkIfExist(page);
if (mark != null) {
Mark.UPDATEDB_MARK.putMark(page, mark);
}
context.write(keyUrl, page);