You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Koen Smets (JIRA)" <ji...@apache.org> on 2014/02/05 19:56:12 UTC

[jira] [Comment Edited] (NUTCH-1679) UpdateDb using batchId, link may override crawled page.

    [ https://issues.apache.org/jira/browse/NUTCH-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13892415#comment-13892415 ] 

Koen Smets edited comment on NUTCH-1679 at 2/5/14 6:54 PM:
-----------------------------------------------------------

I can confirm that this issue also occurs when using a Cassandra datastore.

Although, the `bin/crawl` script changed in [NUTCH-1556] only by adding the `$batchId` from the one in 2.2.1, this changes behaviour drastically. A lot of pages get refetched sooner than indicated by db.default.fetch.interval and outnumber the unfetched pages. 

Although I noticed the remarkable speedup when focusing only on the pages from the current batch, I changed `$batchId` to `-all` in order to give preference to the pages that are definitely not yet  fetched.


was (Author: ksmets):
I can confirm that this issue also occurs when using a Cassandra datastore.

Although, the `bin/crawl` script changed in [NUTCH-1556] only by adding the `$batchId` from the one in 2.2.1, this changes behaviour drastically. A lot of pages get refetched sooner than indicated by db.default.fetch.interval and outnumber the unfetched pages. 

Although I noticed the remarkable speedup when focusing only on the pages from the current batch, I changed `$batchId` to `-all` in order to give preference to the pages that are truly fetched.

> UpdateDb using batchId, link may override crawled page.
> -------------------------------------------------------
>
>                 Key: NUTCH-1679
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1679
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Tien Nguyen Manh
>            Priority: Critical
>             Fix For: 2.3
>
>
> The problem is in Hbase store, not sure about other store.
> Suppose at first crawl cycle we crawl link A, then get an outlink B.
> In second cycle we crawl link B which also has a link point to A
> In second updatedb we load only page B from store, and will add A as new link because it doesn't know A already exist in store and will override A.
> UpdateDb must be run without batchId or we must set additionsAllowed=false
> Here are code for new page
>       page = new WebPage();
>       schedule.initializeSchedule(url, page);
>       page.setStatus(CrawlStatus.STATUS_UNFETCHED);
>       try {
>         scoringFilters.initialScore(url, page);
>       } catch (ScoringFilterException e) {
>         page.setScore(0.0f);
>       }
> new page will override old page status, score, fetchTime, fetchInterval, retries, metadata[CASH_KEY]
>  - i think we can change something here so that new page will only update one column for example 'link' and if it is really a new page, we can initialize all above fields in generator
> - or we add operator checkAndPut to store so when add new page we will check if already exist first



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)