You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/10/03 16:32:02 UTC

[jira] [Resolved] (FLINK-7631) Ineffective check in PageRank#open()

     [ https://issues.apache.org/jira/browse/FLINK-7631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu resolved FLINK-7631.
---------------------------
    Resolution: Not A Problem

> Ineffective check in PageRank#open()
> ------------------------------------
>
>                 Key: FLINK-7631
>                 URL: https://issues.apache.org/jira/browse/FLINK-7631
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> From flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/linkanalysis/PageRank.java :
> {code}
>       this.vertexCount = vertexCountIterator.hasNext() ? vertexCountIterator.next().getValue() : 0;
>       this.uniformlyDistributedScore = ((1 - dampingFactor) + dampingFactor * sumOfSinks) / this.vertexCount;
> {code}
> The check for vertexCountIterator.hasNext() should enclose the assignments to both this.vertexCount and this.uniformlyDistributedScore
> Otherwise there may be divide by zero error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)