You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Otis Gospodnetic (JIRA)" <ji...@apache.org> on 2013/12/02 02:34:35 UTC

[jira] [Commented] (NUTCH-1672) Inlinks are added twice in DbUpdateReducer

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

Otis Gospodnetic commented on NUTCH-1672:
-----------------------------------------

Yup, looks redundant.
[~lewismc] is talking about making a release and may want to commit this simple mod before the release.


> Inlinks are added twice in DbUpdateReducer
> ------------------------------------------
>
>                 Key: NUTCH-1672
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1672
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 2.2.1
>            Reporter: Nguyen Manh Tien
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: NUTCH-1672.patch
>
>
> The first for loop is redundant 
> for (ScoreDatum inlink : inlinkedScoreData) {
>       page.putToInlinks(new Utf8(inlink.getUrl()), new Utf8(inlink.getAnchor()));
> }
> ...
> for (ScoreDatum inlink : inlinkedScoreData) {
>       int inlinkDist = inlink.getDistance();
>       if (inlinkDist < smallestDist) {
>         smallestDist=inlinkDist;
>       }
>       page.putToInlinks(new Utf8(inlink.getUrl()), new Utf8(inlink.getAnchor()));
> }



--
This message was sent by Atlassian JIRA
(v6.1#6144)