[
https://issues.apache.org/jira/browse/FLINK-9577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512562#comment-16512562
]
ASF GitHub Bot commented on FLINK-9577:
---------------------------------------
Github user yanghua commented on the issue:
https://github.com/apache/flink/pull/6165
@zentol the field `vertexCount` and `uniformlyDistributedScore` been
initialized in open function. if `vertexCount` was set to default value (0). I
think `uniformlyDistributedScore` keeps default value is OK, otherwise it would
throw an error. if `vertexCount` is not zero, the `uniformlyDistributedScore`
would be calculated accurately.
> Divide-by-zero in PageRank
> --------------------------
>
> Key: FLINK-9577
> URL: https://issues.apache.org/jira/browse/FLINK-9577
> Project: Flink
> Issue Type: Bug
> Components: Gelly
> Affects Versions: 1.4.0, 1.5.0, 1.6.0
> Reporter: Chesnay Schepler
> Assignee: vinoyang
> Priority: Major
>
> {code}
> // org.apache.flink.graph.library.linkanalysis.PageRank#AdjustScores#open
> this.vertexCount = vertexCountIterator.hasNext() ?
> vertexCountIterator.next().getValue() : 0;
> this.uniformlyDistributedScore = ((1 - dampingFactor) + dampingFactor *
> sumOfSinks) / this.vertexCount;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)