[
https://issues.apache.org/jira/browse/FLINK-7631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178375#comment-16178375
]
Ted Yu commented on FLINK-7631:
-------------------------------
Looking at rest of the class, the use of uniformlyDistributedScore doesn't seem
to handle {{Infinity}}
> 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)