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

[jira] [Commented] (NUTCH-1674) Use batchId filter to enable scan (GORA-119) for Fetch,Parse,Update,Index

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

Julien Nioche commented on NUTCH-1674:
--------------------------------------

Hi,

I haven't played with the filtering in GORA yet but just to make sure I understand properly, in the FetcherJob

{code}
  private MapFieldValueFilter<String, WebPage> getBatchIdFilter(String batchId) {
    if (batchId.equals(Nutch.ALL_CRAWL_ID.toString())) {
      return null;
    }
    MapFieldValueFilter<String, WebPage> filter = new MapFieldValueFilter<String, WebPage>();
    filter.setFieldName(WebPage.Field.MARKERS.toString());
    filter.setFilterOp(FilterOp.EQUALS);
    filter.setFilterIfMissing(true);
    filter.setMapKey(Mark.GENERATE_MARK.getName());
    filter.getOperands().add(new Utf8(batchId));
    return filter;
  }
{code}

this keep only the elements which have a generate mark with the given batchID as value, right? And if we don't fetch a specific batch then the filter is not applied at all. Can't we filter just on the Map i.e. get the elements which have a generate mark regardless of the value?



> Use batchId filter to enable scan (GORA-119) for Fetch,Parse,Update,Index
> -------------------------------------------------------------------------
>
>                 Key: NUTCH-1674
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1674
>             Project: Nutch
>          Issue Type: Improvement
>    Affects Versions: 2.3
>            Reporter: Tien Nguyen Manh
>             Fix For: 2.3
>
>         Attachments: NUTCH-1674.patch, NUTCH-1674_2.patch, NUTCH-1674_3.patch, NUTCH-1674_final.patch
>
>
> Nutch always scan the whole crawldb in each phrase (generate, fetch, parse, update, index). When crawldb is big, the time to scan is bigger than the actual processing time.
> We really need to skip records while scanning using GORA-119 for example we can only get records belong to a specified batchId.
> In my crawl the filter reduce the time to scan from 90 min to 30 min.



--
This message was sent by Atlassian JIRA
(v6.2#6252)